Hacker News new | ask | show | jobs
by pjm331 90 days 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

4 comments

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.

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.
If you're on macOS have you tried Karabiner Elements? It seems to do just fine with software mapping my macbook keyboard.
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.
yeah the CTRL+D definitely gives me problems from time to time but thus far i have been too lazy to fix it
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?

Im sure that’s possible but my own working style is too chaotic for saving workspaces like that haha
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!