Comment by pjm331
14 hours ago
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
Wow... that's... incredible. I've used Hammerspoon forever and never knew that existed.
Just messing around I found you can extend the grid size with `hs.grid.setGrid('4x4')`, which you also may then want to shrink the text size with `hs.grid.ui.textSize = 30`, and finally if you use an alternative keyboard layout (eg: Colemak), you can set the grid to use it with `hs.grid.HINTS`. They really thought of everything with this feature.
This is amazing! I have a slightly more elaborate setup that allows me to resize from one or another side, similar to what Apple added recently but with more flexibility, but this is super interesting, thanks for sharing!
Neat until you need to sync configs or keep multiple machines in harmony, at which point dotfile headaches stack up with Hammerspoon and Lua. Adding complex logic like window rules, app-specific behavior, or handling monitor changes strips away some of that hotkey simplicity and leads to endless tweaking. Still, for avoiding the mouse, it's one of the few flexible options left on macOS that doesn't feel ancient. Tradeoffs everywhere but nowhere else really compares in control.
Syncing configs is a pretty solved problem with dotfile repos. I even made a starter repo anyone can fork & use: https://github.com/dbalatero/dotfiles-starter
Not that I insert EOFs very often, but does that conflict with CTRL+D in the terminal?
I use EOF all the time to end terminal sessions.
Great handle, btw.
Make caps lock a hyperkey (shift+ctrl+option+cmd) and use that for non-overlapping shortcuts
make caps lock control on hold, double quote on tap. Make control hyperkey on hold, angle bracket on tap. My keyboard firmware is very odd. This is not easily done with soft remaps to the point that I don't bother trying.
1 reply →
yeah the CTRL+D definitely gives me problems from time to time but thus far i have been too lazy to fix it