From f4859089de29e4b7fe4e92c0c1f1341c12eb2363 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 10 May 2019 22:52:30 +0200 Subject: 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. --- init.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'init.lua') 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) -- cgit v1.2.3