Zero-Config Spectacle Keybindings for Hammerspoon
Spectacle Window Manager Keybindings For Hammerspoon
Lunette is an easily configurable and extendible Hammerspoon package that implements all of the Spectacle keybindings.
Lunette comes with a set of default keybindings. See installation for more on altering and disabling default keybindings.
CommandName | (Chord) Activator |
---|---|
center |
(⌥ ⌘) C |
fullScreen |
(⌥ ⌘) F |
leftHalf |
(⌥ ⌘) ← |
rightHalf |
(⌥ ⌘) → |
topHalf |
(⌥ ⌘) ↑ |
bottomHalf |
(⌥ ⌘) ↓ |
topLeft |
(⌃ ⌘) ← |
bottomLeft |
(⌃ ⌘ ⇧) ← |
topRight |
(⌃ ⌘) → |
bottomRight |
(⌃ ⌘ ⇧) → |
nextDisplay |
(⌃ ⌥ ⌘) → |
prevDisplay |
(⌃ ⌥ ⌘) ← |
nextThird |
(⌃ ⌥) → |
prevThird |
(⌃ ⌥) ← |
enlarge |
(⌃ ⌥ ⇧) → |
shrink |
(⌃ ⌥ ⇧) ← |
undo |
(⌥ ⌘) Z |
redo |
(⌥ ⌘ ⇧) Z |
Download and Install Hammerspoon
Download and unzip Lunette.spoon.zip
to ~/.hammerspoon/Spoons/
or clone this repository and symlink Lunette.spoon
to ~/.hammerspoon/Spoons
Make sure you've enabled Hammerspoon with MacOS via System Preferences > Security & Privacy
Load Lunette in ~/.hammerspoon/init.lua
and bind the Lunette hotkeys:
-- ~/.hammerspoon/init.lua
hs.spoons.use("Lunette", { hotkeys = "default" })
OPTIONAL:
Override default hotkey definitions by passing a custom mapping table to bindHotkeys()
-- ~/.hammerspoon/init.lua
hs.loadSpoon("Lunette")
customBindings = {
leftHalf = {
{{"Q", "W"}, "E"},
{{"cmd", "alt"}, "left"},
},
rightHalf = {
{{"A", "S"}, "D"},
},
undo = false,
redo = false
}
spoon.Lunette:bindHotkeys(customBindings)
Feel free to submit an issue/feature request/pull request.
Bugfix:
New features:
Minor bugfixes and improvements:
math.floor
(@shayneholmes)Initial Release