Hammerspoon – Lua-based powerful tool automation of macOS
hammerspoon.org
Hammerspoon – Lua-based powerful tool automation of macOS
1–10 of 84 posts
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#2I'm getting melancholic vibes of AutoHotKey reading the docs, which was arguably my first entry into professional programming. Knowing nothing about coding, I built a service desk automation back then — with (network file-) shared hotkeys and a real GUI, all in one single file... good times.
Anyway, ever since switching to MacOS more than a decade ago, I've always been searching for an AHK analog for those simple keystroke automations, text-based, with just enough of a glue language to hold it all together — Automator never quite cut it for me, after wielding the full power of AHK, it always felt too limited, rigid and clicky-colory.
Even though I don't have immediate use cases for it anymore, it makes me very happy that I know where to go back now!
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#3Re: Hammerspoon – Lua-based powerful tool automation of macOS
#4Really nice at first sight. I'm getting melancholic vibes of AutoHotKey reading the docs, which was arguably my first entry into professional programming. Knowing nothing about coding, I built a service desk automation back then — with (network file-) shared hotkeys and a real GUI, all in one single file... good times. Anyway, ever since switching to MacOS more than a decade ago, I've always been searching for an AHK…
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#5Re: Hammerspoon – Lua-based powerful tool automation of macOS
#6Re: Hammerspoon – Lua-based powerful tool automation of macOS
#7Re: Hammerspoon – Lua-based powerful tool automation of macOS
#8Really nice at first sight. I'm getting melancholic vibes of AutoHotKey reading the docs, which was arguably my first entry into professional programming. Knowing nothing about coding, I built a service desk automation back then — with (network file-) shared hotkeys and a real GUI, all in one single file... good times. Anyway, ever since switching to MacOS more than a decade ago, I've always been searching for an AHK…
Have you tried AppleScript scripting? You can glue applications together and even use JavaScript if you’re not a fan of AppleScript
So with that runtime you could easily just write whatever would happen if you press which key combo (or do cronjob-like things managed by the runtime) and then write what happens inline.
Write it all to a single script, copy it to a coworker's computer, run it, several dozen key combos just work now.
That's something I couldn't manage to pull off in AppleScript or Automator, but then again maybe I was just too dumb.
Re: Hammerspoon – Lua-based powerful tool automation of macOS
#9Re: Hammerspoon – Lua-based powerful tool automation of macOS
#10My MacOS automation is now my QMK keyboard calling Alfred workflows; I use Yabai for window management.
I admire Lua, but ran into some sharp edges learning to program in it. Still, one can get up to speed quickly if one knows other scripting languages.
Hammerspoon window management was deathly slow. Yabai is close to instantaneous.