4 ms·
Got any Hammerspoon config to share? I've used it for simple stuff for years, but recently noticed that people use it for window management, and macos' handling
by alanbernstein 4y ago
Got any Hammerspoon config to share? I've used it for simple stuff for years, but recently noticed that people use it for window management, and macos' handling of windows on my second monitor is driving me nuts...
- NateEag 4y agoI spent years furious with OS X's flaky handling of windows on disconnect/reconnect of windows. A few hours with Hammerspoon have made that a non-issue, and I've hardly had to think about window positioning or size since hammering this logic out: https://github.com/NateEag/dotfiles/blob/5d47773e0e7cacb913941664d3d2102f6850eb19/src/.hammerspoon/init.lua#L186 https://github.com/NateEag/dotfiles/blob/5d47773e0e7cacb9139...
- nonissue 4y agoI know your comment is stale at this point, but my hammerspoon config is quite extensive. Here's the Spoon I created for window management: https://github.com/nonissue/hammerspoon/blob/main/_Spoons/Fenestra.spoon/init.lua https://github.com/nonissue/hammerspoon/blob/main/_Spoons/Fe... Essentially, `cmd + alt + left / right` resizes the frontmost window to 50% the screen width, and moves it to the specified side of the screen. `alt + space` maximizes the frontmost window. `cmd + alt + ctrl + P` sends the frontmost window to your next screen, and you can repeat it to move windows between multiple monitors. I also have an undo function that lets you revert any of the window management actions you've taken. Let me know if you have any questions / concerns!