Zero-Config Spectacle Keybindings for Hammerspoon
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Lunette.spoon
LICENSE.md
Lunette.spoon.zip
README.md

README.md

Lunette

Spectacle Window Manager Keybindings For Hammerspoon

Lunette is an easily configurable and extendible Hammerspoon package that implements all of the Spectacle keybindings.

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

Installation

  1. Download and Install Hammerspoon

  2. Download and unzip Lunette.spoon.zip to ~/.hammerspoon/Spoons/ or clone this repository and symlink Lunette.spoon to ~/.hammerspoon/Spoons

  3. Load Lunette in ~/.hammerspoon/init.lua

    -- ~/.hammerspoon/init.lua
    hs.loadSpoon("Lunette")
  4. Bind the Lunette Hotkeys

    For the default Spectacle configuration, simply call bindHotkeys() without any arguments in init.lua:

    -- ~/.hammerspoon/init.lua
    spoon.Lunette:bindHotkeys()

    To customize or disable specific keybindings, simply create a custom mapping table and pass it as an arg to bindHotkeys().

    To customize keybindings, the mapping table keys must correspond to Lunette command names (see keybindings above) and their values must either be a two-element map containing either a chord map or single key in the first position, and an activation key in the second position.

    To disable a specific keybinding, set the value of the given command's key to false.

    -- example custom map with `leftHalf` and `rightHalf` reconfigured and the history commands disabled
    
    customBindings = {
      leftHalf = {{"Q", "W"}, "E"},
      rightHalf = {{"A", "S"}, "D"},
      undo = false,
      redo = false
    }
    
    spoon.Lunette:bindHotkeys(customBindings)

Contribution

Feel free to submit an issue/feature request/pull request.