aboutsummaryrefslogtreecommitdiff
path: root/mjolnir
diff options
context:
space:
mode:
authorMatt Singleton <matt@xcolour.net>2014-12-25 00:43:28 -0500
committerMatt Singleton <matt@xcolour.net>2014-12-25 00:43:59 -0500
commit72856b47a63f12c84992a6db25f2c46d4735374a (patch)
treeb71982a3bf20e083a36650a3d1a642c598748c63 /mjolnir
parent413ffee7a840acf99da77eb645a0b447717da1b9 (diff)
use mjolnir for mac window management
Diffstat (limited to 'mjolnir')
-rw-r--r--mjolnir/init.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/mjolnir/init.lua b/mjolnir/init.lua
new file mode 100644
index 0000000..d0084a4
--- /dev/null
+++ b/mjolnir/init.lua
@@ -0,0 +1,38 @@
+local application = require "mjolnir.application"
+local window = require "mjolnir.window"
+local hotkey = require "mjolnir.hotkey"
+local fnutils = require "mjolnir.fnutils"
+
+hotkey.bind({"alt"}, "0", function()
+ local win = window.focusedwindow()
+ win:maximize()
+end)
+
+hotkey.bind({"alt"}, "left", function()
+ local win = window.focusedwindow()
+ if win ~= nil then
+ win:movetounit({x=0, y=0, w=0.5, h=1})
+ end
+end)
+
+hotkey.bind({"alt"}, "right", function()
+ local win = window.focusedwindow()
+ if win ~= nil then
+ win:movetounit({x=0.5, y=0, w=0.5, h=1})
+ end
+end)
+
+hotkey.bind({"alt"}, "down", function()
+ local win = window.focusedwindow()
+ if win ~= nil then
+ win:movetounit({x=0.15, y=0, w=0.70, h=1})
+ end
+end)
+
+hotkey.bind({"alt"}, "r", function()
+ mjolnir:reload()
+end)
+
+hotkey.bind({"alt"}, "c", function()
+ mjolnir.openconsole()
+end)