Live data from Hacker News

Hammerspoon

github.com

101–110 of 154 posts

Re: Hammerspoon

#101
post #68

Hammerspoon maintainer here - I'm enjoying reading all the comments, and hoping that everyone isn't going to be annoyed that I'm mostly working on a v2 atm, which switches from Lua to JavaScript :D

Can't wait for the JS switch! Personally, it's having to figure out Lua is what's kept me away from it... :)

Re: Hammerspoon

#102
Excited to see this here! Only yesterday I used it to create an interactive native-like notification my coding agents use to ping me when they push a PR. I had tried a few different libraries over the past month but only hs had the ability to render custom panes over maximized windows.

Will be using it for more automation tools moving forward.

Re: Hammerspoon

#104

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…

I pretty much only use it for two (related) things these days: - check the list of open Teams windows; if there's a non-standard one, assume I'm in a meeting and webhook to HomeAssistant to select the "active"[2] preset on my meeting light[0]. - download my work ical[1] and, if there's a pending meeting ( [0] Just a short strip of WS2812B connected to an ESP32 running WLED. [1] Originally this was a simple HTTP to my…

I do something simular. I use the window titles to track the call lenghth and the icon in the menubar to track my teamsstatus. Works flawless.

Re: Hammerspoon

#105
post #101
post #68

Hammerspoon maintainer here - I'm enjoying reading all the comments, and hoping that everyone isn't going to be annoyed that I'm mostly working on a v2 atm, which switches from Lua to JavaScript :D

Can't wait for the JS switch! Personally, it's having to figure out Lua is what's kept me away from it... :)

Lua in HS is what motivated me to finally learn a lisp (Fennel).

Re: Hammerspoon

#106

Earlier quoted context omitted.

I pretty much only use it for two (related) things these days: - check the list of open Teams windows; if there's a non-standard one, assume I'm in a meeting and webhook to HomeAssistant to select the "active"[2] preset on my meeting light[0]. - download my work ical[1] and, if there's a pending meeting ( [0] Just a short strip of WS2812B connected to an ESP32 running WLED. [1] Originally this was a simple HTTP to my…

This is a great integration!

I'll slap it up on my Forgejo when I've got a spare minute (because it depends on my ical->json server as well which I don't believe is currently up there.)

Re: Hammerspoon

#107
post #59

Earlier quoted context omitted.

> - Dumping all open Safari tabs to an Obsidian doc I'd love to do this too. Would you mind sharing how you do it? Or is it trivially easy and not worth explaining? (I haven't looked too deeply into HS yet.)

It's not trivial, but roughly: use AppleScript/osascript to get the URLs, but mostly pass them to a ~50 line Bash script which: - Brings in the date path components for the dumped-to folder - Makes a hash of the URL for an Obsidian doc (each tab gets their own doc) - Uses Chrome command line (--headless --disable-gpu --dump-dom) to save a snapshot of the page contents - Uses it again with --screenshot to make a thumb…

> - Uses Chrome command line (--headless --disable-gpu --dump-dom) to save a snapshot of the page contents > - Uses it again with --screenshot to make a thumbnail

You could combine both of those into "run Archivebox somewhere and pass the URLs into that" (which is what I do for "URLs I save to Instapaper" - they go to my Linkhut, Pinboard, my Archivebox, and once I've fixed my code, to archive.org as well.)

Re: Hammerspoon

#108

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…

Could you share your config?

Re: Hammerspoon

#110
Glad to see other people using it. Saved my life, was going crazy click-clicking to nab the right window. Now Cmd-1..9 brings to focus a window of my chosen application. (Chrome) In case it helps someone else, myself and Codex iterating over time https://github.com/ljubomirj/dotfiles/blob/main/.hammerspoon.... Cmd-1..9 switches over focuses to a particular window, Cmd-0 presents an (ugly; but suffices) dialog box to select the window with arrows (of the App of interest - Chrome for me atm) to switch to. But more important - to see what window what Window name is recalled by the particular Cmd-1..9 shortcut. Option-arrows shuffle window-to-key ordering. I right-click-Name Window my windows. Think back now - on restart they may even be preserved?? Don't recall re/naming them manually recently. (possible I've forgotten though)
Post reply on HN