I Just Unlocked MacOS GOD MODE With Hammerspoon


I Just Unlocked MacOS GOD MODE With Hammerspoon

Ever felt like your Mac is an overprotective parent, constantly limiting what you can do?

Can't open any downloaded app, can't control your own notifications, can't do anything that isn't strictly within the boundaries dictated by Apple...

I just discovered a power tool that hands you the keys to the kingdom – Hammerspoon, a decade-old but criminally underrated Mac automation tool that lets you bend macOS to your will with simple Lua scripting.

Most Mac users wrestling with automation either resort to Apple's limited Shortcuts app or dive into complex AppleScript solutions.

While these tools work for basic tasks, they often fall short when you need deeper system control or want to create complex workflows. In my case, I desperately wanted a notification to pop with every upcoming meeting, without having a dedicated browser tab opened, working through Apple's "standby mode", AND clickable so that it takes me straight to the meeting link if it exists in the invitation!

As quoted in the official Hammerspoon documentation, it's

"just a bridge between the operating system and a Lua scripting engine"
- hammerspoon.org

But this simple description says everything about its power.
I spent the last few weeks exploring Hammerspoon's capabilities, and it's changed how I interact with my Mac.

Want to create custom keyboard shortcuts that launch apps and navigate to specific menu items? Done (I know what you're thinking... yes - another macOS app launcher, woo hoo).

Need smart calendar notifications that not only alert you about meetings but also extract and display the meeting link? Absolutely possible. The real game-changer is how Hammerspoon lets you write simple Lua code to control virtually any aspect of your system.

Here's the approach that worked for me: instead of fighting with Apple scripts (if you ever wrote one, you KNOW it's a fight), I started small with Hammerspoon.

First, I created basic keyboard shortcuts for app launching.

Then, I graduated to window management scripts.

Finally, I built a custom calendar notification system that pulls from Google Calendar and displays meeting alerts exactly how I want them.

But this is only scratching the surface, the list of APIs Hammerspoon covers is HUGE.

You can control custom alerts, audio devices, the battery, camera, drawing on screen, controlling the mouse, network, wifi and SO MUCH MORE!

The best part? Everything is customizable through straightforward Lua code.

Don't want to write Lua?

What makes this different from other automation tools is Hammerspoon's "spoons" – pre-built modules you can simply drop in and use.

Think of them as building blocks for your setup. Pick and choose, mix and match, do what works for you.

A word of warning: while spoons are extremely useful, some of them are a bit outdated. This is why I resorted to writing my own code when it came to more complex cusotmizations, so just keep this in mind.

Want to get started? Head to hammerspoon.org, install via Homebrew with a simple brew install hammerspoon, and you'll be writing your first automation script in minutes.

Feel free to respond with comments, questions and thoughts!

See ya next week.

ESPRESSO FRIDAYS

Every once in a while I send hand picked things I've learned. Kind of like your filter to the tech internet. No spam, I promise!

Read more from ESPRESSO FRIDAYS

How DHH Solved Deploying to Production (with Open Source) Ever felt depressed by the sheer complexity of getting your application live and serving users? You’re not alone. But what if deploying to production, even (or especially) across multiple servers, could be straightforward and more importantly, free? That’s the reality DHH, the creator of Ruby on Rails and CTO of Basecamp & HEY, wanted to create, and he delivered with an open source tool called Kamal. DHH’s approach to technology always...

The UNDERRATED Open Source Powering My HomeLab This issue is brought to you by: Secure Your AI Future at Snyk Launch 2025 Join Snyk Launch to discover how to establish a foundation to build securely and confidently in the age of AI. Register for Snyk Launch 2025 (It’s Free!) Kestra, an open-source automation platform that's been a game-changer for my homelab and, frankly, could be for a lot more. It's one of those tools that flies under the radar for too many people, but packs so much...

He Made $64K Searching GitHub With A GENIUS Trick (using open source only) This issue is brought to you by: TestSprite is the Easiest AI Agent for Software Testing Ensure End-to-End Confidence in Your Software Quality. LEARN MORE This, is the story of how one individual, "Mr. B," leveraged a deep understanding of Git's less-explored features to uncover secrets in public repositories, earning over $64,000 💰. His "genius trick" wasn't about finding new tools, but about using existing Git...