Live data from Hacker News

Hammerspoon

github.com

1–10 of 154 posts

Re: Hammerspoon

#2
Has 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

#3
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

#5
is there a particular reason this was shared?

otherwise I'm slowly working on a Spoon that figures out if there is an active meeting in Zoom, Teams, Huddle, Google Meet and will allow for muting, video enable/disable and screen sharing etc

Re: Hammerspoon

#7
post #3

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

Not that I insert EOFs very often, but does that conflict with CTRL+D in the terminal?

Re: Hammerspoon

#8
I utterly love Hammerspoon.

It's fun to combine with qmk [0], which gives you a bunch more options for hotkeys on your keyboard via layers. I've ended up with a layer where half the keyboard is Hammerspoon shortcuts directly to apps (e.g. go to Slack, to Chrome, etc.) and half of it is in-app shortcuts (like putting cmd-number on the home row, for directly addressing chrome tabs).

Between this and one of the tiling window manager-adjacent tools (I use Sizeup), I can do all my OS-level navigation directly. "Oh I want to go to Slack and go to this DM" is a few keystrokes away, and not dependent on what else I was doing.

[0] https://qmk.fm/

Re: Hammerspoon

#9
post #3

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

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.

Re: Hammerspoon

#10
Hammerspoon is the glue that holds my Mac together. For a starter list of things to do with this app, a partial list of the things that I'm using it for:

  - Dumping all open Safari tabs to an Obsidian doc
  - Adding 'hyper' (Ctrl-Opt-Cmd) keybinds to pop a new window for:
    - Safari
    - Finder
    - Terminal / Ghostty
    - VS Code
    - Notes
    - Editing Hammerspoon/AeroSpace/Sketchybar config
    - Reloading Hammerspoon config
    - Reloading Sketchybar
    - Quitting all Dock apps except Finder
    - Screen lock
    - System sleep
    - Opening front Finder folder in VS Code
    - Opening front Safari URL on Archive.today
    - Showing front Safari window tab count
    - Showing front app bundle ID
    - Posting notification about current Music track
    - Controlling my Logi Litra light (various color temps/brightnesses)
    - Starting/stopping a client work timer
  - Tying it to AeroSpace for:
    - Pushing a window to another monitor
    - Performing a two-up window layout
    - Swapping those two windows
    - Closing all other workspace windows
    - Gathering all windows to first workspace
  - Ensuring some background apps stay running if they crash
  - Prompting to unmount disk images if trashed
  - Binding into Skim to jump to specific sections of spec PDFs using terse Markdown URLs
Post reply on HN