aboutsummaryrefslogtreecommitdiffstats
path: root/init.lua
diff options
context:
space:
mode:
authorTeddy Wing2019-05-10 22:52:30 +0200
committerTeddy Wing2019-06-15 20:30:31 +0200
commitf4859089de29e4b7fe4e92c0c1f1341c12eb2363 (patch)
treedaa4466e5c4a40b17e25288878a6e99f6efee6b8 /init.lua
parent613aa5cdf7b7b6f5b568138c21aeb7b48f2bacdb (diff)
downloaddothammerspoon-f4859089de29e4b7fe4e92c0c1f1341c12eb2363.tar.bz2
init.lua: Add hotkey to extend window height to bottom
Makes it easier to maximise windows. Want this to embiggen browser windows to full height when I connect to an external monitor.
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 69106ff..28e7bd2 100644
--- a/init.lua
+++ b/init.lua
@@ -17,3 +17,13 @@ for i=0,9 do
end
end)
end
+
+
+-- Maximise window height
+hs.hotkey.bind({'ctrl', 'alt'}, 'z', function()
+ local win = hs.window.frontmostWindow()
+ local f = win:frame()
+
+ f.h = hs.screen.mainScreen():frame().h
+ win:setFrame(f)
+end)