News for hackers. Stuff that matters.
Re:Hammerspoon by pjm331 on Friday March 13, 2026 @02:50PM (#47368116)
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

Re:Hammerspoon by hrmtst93837 on Friday March 13, 2026 @04:14PM (#47369246)
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.
Re:Hammerspoon by dbalatero on Friday March 13, 2026 @06:32PM (#47370876)
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
Re:Hammerspoon by elAhmo on Friday March 13, 2026 @03:43PM (#47368818)
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!
Re:Hammerspoon by stackghost on Friday March 13, 2026 @03:25PM (#47368582)
Not that I insert EOFs very often, but does that conflict with CTRL+D in the terminal?
Re:Hammerspoon by xyzzy_plugh on Friday March 13, 2026 @03:28PM (#47368615)
I use EOF all the time to end terminal sessions.
Re:Hammerspoon by commandertso on Friday March 13, 2026 @04:06PM (#47369150)
Great handle, btw.
Re:Hammerspoon by pjm331 on Friday March 13, 2026 @03:54PM (#47368980)
yeah the CTRL+D definitely gives me problems from time to time but thus far i have been too lazy to fix it
Re:Hammerspoon by theshrike79 on Friday March 13, 2026 @04:43PM (#47369605)
Make caps lock a hyperkey (shift+ctrl+option+cmd) and use that for non-overlapping shortcuts
Re:Hammerspoon by 1-more on Friday March 13, 2026 @05:01PM (#47369848)
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.
Re:Hammerspoon by dbalatero on Friday March 13, 2026 @11:34PM (#47373071)
If you're on macOS have you tried Karabiner Elements? It seems to do just fine with software mapping my macbook keyboard.
Re:Hammerspoon by 1-more on Sunday March 15, 2026 @03:16PM (#47390866)
I do use it. Before the way config worked changed I had hold/tap control/double-quote working. But they changed the way config works and I didn’t bother to fix that because I made a keyboard that does what I want exactly and when I’m on my laptop keyboard I don’t care toooo much.
Re:Hammerspoon by matthewmc3 on Friday March 13, 2026 @07:31PM (#47371422)
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.

Re:Hammerspoon by hackerthemonkey on Sunday March 15, 2026 @07:03AM (#47386226)
This is amazing. Thanks for sharing. Did you ever look into capturing the states of where all the windows are once you are done with resizing them? So as to restore them later back into position if they ever get out of alignment ?

Thinking of the usecase where every task or a project deserves a certain arrangement of windows and it would be good to summon them into existence as and when needed?

Re:Hammerspoon by pjm331 on Sunday March 15, 2026 @08:50AM (#47386920)
Im sure that’s possible but my own working style is too chaotic for saving workspaces like that haha