Directory
Developer Zone
Design & Creativity
Productivity
Other Utilities
Others
Hammerspoon
Hammerspoon is a powerful macOS automation tool that uses Lua scripting to manage windows, customize hotkeys, and automate system tasks, significantly improving work efficiency. Ideal for developers and advanced users to customize their workflows.
Hammerspoon
Overview
Hammerspoon is a powerful macOS automation tool that bridges the operating system with the Lua scripting engine, enabling users to deeply control and automate various aspects of macOS by writing Lua scripts.
Core Features
- System API Bridging: Exposes macOS system functionalities to Lua via a set of extension modules
- Comprehensive Coverage: Supports applications, windows, mouse pointers, file systems, audio devices, battery, screens, keyboard/mouse events, clipboard, location services, Wi-Fi, and more
- Event-Driven Automation: Connects system events to custom actions through Lua configuration files
Key Features
🎯 Window Management
- Customize keyboard shortcuts to control window layout and positioning
- Quickly arrange and switch between application windows
- Create complex sequences of window operations
⌨️ Input Device Control
- Low-level monitoring and remapping of keyboard and mouse events
- Create global shortcuts to trigger complex operations
- Implement custom input device behaviors
🌐 Network Automation
- Trigger actions based on Wi-Fi network connection status
- Automatically execute network-related configurations and tasks
- Adjust system settings according to changes in network environment
🔋 System Status Monitoring
- Monitor and alert on battery level
- System event triggers (e.g., screen lock, user switch)
- Automated responses to hardware state changes
🔧 Deep Integration
- Seamless integration with AppleScript
- Access to native macOS APIs
- Support for location-based triggers (e.g., geolocation-based automation)
Advantages
💪 Powerful & Flexible
- Unlimited Automation: Capable of controlling nearly every aspect of macOS
- Lua Scripting: Uses lightweight yet powerful Lua language for programming
- Modular Design: Easily extend functionality via modules
🎨 Highly Customizable
- Personalized Configuration: Each user can create unique automation setups
- Community Plugins: Supports “Spoons” (prebuilt plugin packages)
- Progressive Learning: Suitable for beginners to experts, from simple scripts to complex systems
🔄 Responsive Architecture
- Event-Driven: Real-time response to system state changes
- Background Operation: Low resource usage, continuous monitoring
- Instant Effect: Configuration changes apply immediately without restart
Use Case Examples
- Boost Productivity: One-click window layout organization
- Smart Environment Adaptation: Automatically switch work modes based on network connection
- Health Reminders: Timed reminders to rest, adjust screen brightness
- Creative Automation: Automatically play music when detecting specific geolocation
- Developer Assistance: Custom hotkeys and automation workflows for development environments
Community & Ecosystem
- Active Community: Discord server for user discussion and support
- Rich Documentation: Complete API reference and beginner’s guide
- Open Source Contributions: Developers welcome to contribute new extensions and features
- Plugin Ecosystem: A wide selection of “Spoons” plugins available for use
Technical Foundations
- Core Language: Lua 5.3/5.4
- System Requirements: macOS 10.12 or higher
- Architecture: Hybrid Objective-C + Lua
- Configuration File:
~/.hammerspoon/init.luaas the main config
Ideal For
- Professionals seeking maximum productivity
- Users who enjoy automating repetitive tasks
- Developers and tech enthusiasts
- Users needing deep customization of macOS
Hammerspoon is more than just an automation tool—it’s like giving macOS a programmable, intelligent brain, allowing users to use their computer exactly the way they want. While there is a learning curve, mastering it makes it the ultimate tool for enhancing your macOS experience.
Tip: Beginners are encouraged to start with the official getting-started guide and explore gradually. The community is very supportive—feel free to seek help on Discord or GitHub if you encounter issues.
All software data on this site is synchronized from the Awesome mac project. Copyright belongs to original authors.
Recommended Apps
HapticKey
HapticKey delivers tactile feedback for the MacBook Pro's Touch Bar and keyboard, providing a clear vibration cue with every keypress. It supports customizable feedback intensity and patterns, enhancing typing accuracy and operational awareness. Ideal for Mac users who value refined tactile experiences.
HTTrack
HTTrack is a powerful website mirroring tool that downloads entire websites to your local computer for offline browsing and archiving. It accurately replicates website structures, images, and links, making it an essential assistant for web page backup and research development.
Hungrymark
Hungrymark is an efficient macOS bookmark management tool that supports multiple browsers including Safari, helping you categorize and organize your saved web links. It offers fast access and search functionality to enhance your web browsing efficiency.
HWSensors
HWSensors is a free Mac hardware monitoring tool that reads CPU, GPU temperatures, fan speeds, and voltages in real time, displaying data intuitively through a dashboard to help you understand and maintain your system's health.
iStat Pro
iStat Pro is a professional Mac system monitoring tool that provides real-time display of key performance metrics such as CPU, memory, disk, and network, helping users comprehensively monitor their computer's health and optimize system performance.
Karabiner
Karabiner is a professional macOS keyboard customization tool that allows key remapping, creation of complex shortcuts, disabling of repeated keystrokes, and support for mechanical keyboard configurations, enhancing keyboard usage efficiency.

Comments