CommunityNews

CommunityNews

Hammerspoon - tool for powerful automation of macOS

This is a tool for powerful automation of OS X. At its core, Hammerspoon is just a bridge between the operating system and a Lua scripting engine. What gives Hammerspoon its power is a set of extensions that expose specific pieces of system functionality, to the user.

What can it do for me?

You can write Lua code that interacts with OS X APIs for applications, windows, mouse pointers, filesystem objects, audio devices, batteries, screens, low-level keyboard/mouse events, clipboards, location services, wifi, and more.

If you want to explore the options Hammerspoon offers, check out the Getting Started Guide and the full API documentation as well as the already pre-made plugins called Spoons.

Typically you would write a configuration file in Lua that connects events to actions. You might want to bind a keyboard shortcut to a series of window operations, or an applescript. You might want to run a series of commands when your wifi interface connects to your home network. You might want to display an alert when your battery drops below a certain percentage. You might want to do something crazy like have iTunes automatically start playing when your Mac detects you are in Paris.

This thread was posted by one of our members via one of our news source trackers.

Popular Mac Os topics Top

New
AstonJ
A statement from Apple regarding recent privacy concerns… Privacy protections macOS has been designed to keep users and their data safe...
New
New
First poster: kokolegorille
hello (also known as helloSystem ) is a desktop system for creators with focus on simplicity, elegance, and usability. Its design follows...
New
AstonJ
I think we need a macOS rants thread - just for those little things that bug us :face_with_symbols_over_mouth: Feel free to start dedica...
New
AstonJ
Just wasted hours trying to figure out why my Apple Magic keyboard 2 started lagging after the latest macOS upgrade - tried SMC and PRAM ...
New
First poster: bot
This is a tool for powerful automation of OS X. At its core, Hammerspoon is just a bridge between the operating system and a Lua scriptin...
New
New
First poster: bot
Create macOS or Linux virtual machines - WWDC22 - Videos - Apple Developer. Learn how you can use the Virtualization framework to quickl...
New
BadPistol97
I am trying to draw NSPanels on texts of other apps using AXObserverAddNotification with the attribute of kAXValueChangedNotification on ...
New

Other popular topics Top

DevotionGeo
I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New
Exadra37
On modern versions of macOS, you simply can’t power on your computer, launch a text editor or eBook reader, and write or read, without a ...
New
AstonJ
This looks like a stunning keycap set :orange_heart: A LEGENDARY KEYBOARD LIVES ON When you bought an Apple Macintosh computer in the e...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New
PragmaticBookshelf
Author Spotlight: Tammy Coron @Paradox927 Gaming, and writing games in particular, is about passion, vision, experience, and immersio...
New
First poster: bot
zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig. General-purpose programming language and toolchain for maintaini...
New
PragmaticBookshelf
Author Spotlight: Bruce Tate @redrapids Programming languages always emerge out of need, and if that’s not always true, they’re defin...
New
New