Created
October 7, 2015 13:48
-
-
Save peleteiro/e00ae62c96b32d2b317b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local application = require "mjolnir.application" | |
local hotkey = require "mjolnir.hotkey" | |
local window = require "mjolnir.window" | |
local screen = require "mjolnir.screen" | |
local fnutils = require "mjolnir.fnutils" | |
hotkey.bind({"cmd", "alt", "ctrl"}, "M", function() | |
local win = window.focusedwindow() | |
local screen = screen.mainscreen() | |
win:setframe(screen:fullframe()) | |
end) | |
hotkey.bind({"cmd", "alt", "ctrl"}, "left", function() | |
local win = window.focusedwindow() | |
local screen = screen.mainscreen() | |
local frame = screen:fullframe() | |
frame.w = frame.w * 0.6 | |
win:setframe(frame) | |
end) | |
hotkey.bind({"cmd", "alt", "ctrl"}, "right", function() | |
local win = window.focusedwindow() | |
local screen = screen.mainscreen() | |
local frame = screen:fullframe() | |
frame.x = frame.w - (frame.w * 0.4) | |
frame.w = frame.w * 0.4 | |
win:setframe(frame) | |
end) | |
hotkey.bind({"cmd", "alt", "ctrl"}, "up", function() | |
local win = window.focusedwindow() | |
local screen = screen.mainscreen() | |
local frame = screen:fullframe() | |
frame.x = frame.w - (frame.w * 0.4) | |
frame.w = frame.w * 0.4 | |
frame.h = frame.h * 0.7 | |
win:setframe(frame) | |
end) | |
hotkey.bind({"cmd", "alt", "ctrl"}, "down", function() | |
local win = window.focusedwindow() | |
local screen = screen.mainscreen() | |
local frame = screen:fullframe() | |
frame.x = frame.w - (frame.w * 0.4) | |
frame.w = frame.w * 0.4 | |
frame.y = frame.h - (frame.h * 0.3) | |
frame.h = frame.h * 0.3 | |
win:setframe(frame) | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment