here is my entire config hs.hotkey.bind({"ctrl"}, "D", function() hs.grid.show() end) i've tried all of the other fancy window managers and for me nothing has ever beat the ease of use of just (1) ctrl-d to see the grid, (2) type the letter where you want the top left corner of your window to be, (3) type the letter where you want the bottom right corner to be window resized
Hammerspoon
11–20 of 154 posts
Re: Hammerspoon
#12Can't live without AutoHotkey on Windows.
Thanks to everyone who contributed to both!
Re: Hammerspoon
#13Re: Hammerspoon
#14It's lua, so you can get creative with https://fennel-lang.org/
Re: Hammerspoon
#15Has anyone worked on making a config replicating aerospace? Hammerspoon seems like a superset and it’s probably better to just have one, instead of two tools warring about who gets the keypresses?
Re: Hammerspoon
#16Re: Hammerspoon
#17I'd love to have a global "toggle Teams mute" button.
Re: Hammerspoon
#18here is my entire config hs.hotkey.bind({"ctrl"}, "D", function() hs.grid.show() end) i've tried all of the other fancy window managers and for me nothing has ever beat the ease of use of just (1) ctrl-d to see the grid, (2) type the letter where you want the top left corner of your window to be, (3) type the letter where you want the bottom right corner to be window resized
Not that I insert EOFs very often, but does that conflict with CTRL+D in the terminal?
Re: Hammerspoon
#19 -- resize based on ratios
function ratioResize(xr, yr, wr, hr)
return function ()
local win = hs.window.focusedWindow()
win:moveToUnit({x=xr,y=yr,w=wr,h=hr})
end
end
-- 4 corners, different sizes
hs.hotkey.bind({"cmd", "ctrl"}, "w", ratioResize(0, 0, 2/5, 2/3))
hs.hotkey.bind({"cmd", "ctrl"}, "e", ratioResize(2/5, 0, 3/5, 2/3))
hs.hotkey.bind({"cmd", "ctrl"}, "s", ratioResize(0, 2/3, 2/5, 1/3))
hs.hotkey.bind({"cmd", "ctrl"}, "d", ratioResize(2/5, 2/3, 3/5, 1/3))
And to throw windows to other monitors: -- send to next screen
hs.hotkey.bind({"cmd", "ctrl"}, ";", function()
local win = hs.window.focusedWindow()
local screen = win:screen()
local next_screen = screen:next()
win:moveToScreen(next_screen)
end)