My config files for Hammerspoon
Please note: this repository has been superseded by dot-hammerspoon and is out of date - do not use it!
This repository contains my config files for Hammerspoon. This config has already replaced my use of the following apps:
- ClipMenu - clipboard history, only
supports text entries for now. See
clipboard.lua.
Shift-Cmd-v
shows the clipboard menu.
- Breakaway - automatically pause/unpause music when headphones are unplugged/replugged. Only for Spotify app at the moment, and it needs latest Hammerspoon built from source (which includes the audio device watcher). See headphones_watcher.lua.
- Spectacle - window
manipulation. Only some shortcuts implemented, those that I use, but
others should be easy to add. See
manipulation.lua.
Ctrl-Cmd-left/right/up/down
- resize the current window to the corresponding half of the screen.Ctrl-Alt-left/right/up/down
- resize and move the current window to the previous/next horizontal/vertical third of the screen.Ctrl-Alt-Cmd-F
orCtrl-Alt-Cmd-up
- maximize the current window.Ctrl-Alt-Cmd-left/right
- move the current window to the previous/next screen (if more than one monitor is plugged in).
- ShowyEdge - menu bar coloring to indicate the currently selected keyboard layout (again, only the indicators I use are implemented, but others are very easy to add). See menubar_indicator.lua.
It additionally provides the following functionality:
- Automatic/manual configuration reloading (hammerspoon_config_reload.lua)
Ctrl-Alt-Cmd-r
- manual reload, or when any*.lua
file in~/.hammerspoon/
changes.
- A color sampler/picker (colorpicker.lua)
Ctrl-Alt-Cmd-c
toggles a full-screen color picker of the colors inhs.drawing.color
(this is more impressive with a larger list of colors, like the one in PR#611). Clicking on any color will copy its name to the clipboard, Cmd-clicking copies its RGB code.
- Mouse locator (mouse/locator.lua).
Ctrl-Alt-Cmd-d
draws a red circle around the mouse for 3 seconds.
- Skype mute/unmute (skype_mute.lua)
Ctrl-Alt-Cmd-Shift-v
mutes/unmutes Skype, regardless of whether it's the frontmost application.
It has drawn inspiration and code from many other places, including: