Automate your macOS with Hammerspoon
I’ve been using macOS for about 8 years and as a dual monitor user there was always a very annoying problem which I could never find a perfect solution for. Every time I connected or disconnected my second monitor from my MacBook, macOS messed up the window positions.
My configuration is a available at github and provides the following features:
- Notifications for hardware events (USB, battery, WiFi, volumes)
- Window layout for single and dual monitor setups
- Connect or disconnect Bluetooth when the second monitor is plugged or unplugged (blueutil must be installed)
- growlnotify replacement:
- Open new Chrome window for development:
This configuration is work in progress and there will be more features in the future.
git clone https://github.com/code2k/.hammerspoon.git ~/.hammerspoon cd ~/.hammerspoon cp example-config.lua config.lua
config.lua as needed.