I use this! - Mute my computer when I put it to sleep or when I change wifi networks - Hyper key - Mail.app menubar indicator - Spotify menubar current song - Shortcut to move mouse cursor to another monitor - Window switcher that only lists apps in the current workspace
Can you share your config?
Hammerspoon – Lua-based powerful tool automation of macOS
61–70 of 84 posts
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#62Since we've hit the front page of HN again, I've just released Hammerspoon 0.9.92, which contains a few fixes and some additions, but mostly refactored a significant amount of internal project structure to allow our build system to be replaced with something that isn't 5 years old and terrible. As a result, it's possible that something broke which we didn't find in our internal testing. Please file GitHub issues :) H…
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#63I love Hammerspoon. It's one of the first must-have-for-a-usable-laptop tools I set up when I get a new MacBook. Here are the top ways I'm using it right now: 1) Hide/show apps similar to how iTerm lets you bind a hotkey to hide/show a terminal. I've got ctrl+space set to Vimcal, alt+space set to midnight.app (a time tracker I'm building), and ctrl+alt+space set to Things. 2) Start/stop playing my work playlist of lo…
Aka how everyone did it before Spotify took off.
But actually, I'm told time and again that Spotify has some APIs to control it—presumably when desktop apps are used (dunno for sure because don't use it myself). Personally I'd use Alfred for that over shortcuts.
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#64Since we've hit the front page of HN again, I've just released Hammerspoon 0.9.92, which contains a few fixes and some additions, but mostly refactored a significant amount of internal project structure to allow our build system to be replaced with something that isn't 5 years old and terrible. As a result, it's possible that something broke which we didn't find in our internal testing. Please file GitHub issues :) H…
One side I've noticed Hammesrpoon is a bit difficult to work with is debugging it can be done with logging to the console, but is not very convenient. Are there plans to introduce something more advanced at some point in the future?
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#65Earlier quoted context omitted.
The language used for this is incidental. The important part is all the OS interfaces exposed. If you know Python, you'll feel comfortable in Lua quickly.
Im just looking for some way to slap something like this on top of some python scripts. Currently I’m only aware of calling applescript like this for python: https://stackoverflow.com/a/41318195
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#66Re: Hammerspoon – Lua-based powerful tool automation of macOS
#67I love Hammerspoon. It's one of the first must-have-for-a-usable-laptop tools I set up when I get a new MacBook. Here are the top ways I'm using it right now: 1) Hide/show apps similar to how iTerm lets you bind a hotkey to hide/show a terminal. I've got ctrl+space set to Vimcal, alt+space set to midnight.app (a time tracker I'm building), and ctrl+alt+space set to Things. 2) Start/stop playing my work playlist of lo…
> I got tired of the friction around opening Spotify, going into my work playlist, hitting play, waiting several moments for the playlist to load, etc, so I downloaded a bunch of mp3s from YouTube and put them in ~/Music/work/. Now my work music is a single keyboard shortcut (semicolon+m) and a few miliseconds away. Aka how everyone did it before Spotify took off. But actually, I'm told time and again that Spotify ha…
The Spotify app also has to be running in order to use the terminal application (at least the one that I tried).
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#68Earlier quoted context omitted.
Please forgive what may be a naive question: Speaking of old and terrible... Are you planning to keep the project in Objective-C long term? Any chance of migrating to Swift? Merry Christmas and thanks for a great project.
I don’t think that’s a naive question at all, it’s something I’ve been thinking about a lot recently. We have something like 70k-75k lines of ObjC and plain C in Hammerspoon, written at various times over the last 7ish years, with varying architectural styles as we’ve figured out better ways of doing things. I would love to have it all ported to Swift with a single, consistent architecture, but it’s a heck of a lot o…
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#69Thanks!
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#70Overall though I’m extremely grateful for Hammerspoon and if it ever stops working I might consider moving to Linux as my personal machine. I am able to chain key presses infinitely and categorize the different functions.
For example, I press “Caps Lock” + “Left shift” + “a” to open a global key chording menu, press “w” for my “window management” category which opens another key chord menu, then press “w” again to maximize my current window. I replace the final “w” with “m” to minimize, “p” to open the most recently used window in a stack of windows in an application. Not only that, these keys are case sensitive so that effectively doubles my space of usable infinite key chords.
Hammerspoon is so amazing for developer workflows after you put the time in.