Git Product home page Git Product logo

lunette's Introduction

Lunette

Spectacle Window Manager Keybindings For Hammerspoon

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

Default 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. Make sure you've enabled Hammerspoon with MacOS via System Preferences > Security & Privacy

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

    -- ~/.hammerspoon/init.lua
    hs.loadSpoon("Lunette")
  5. 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
    -- you can have multiple bindings to run a command, as shown in leftHalf
    
    customBindings = {
      leftHalf = {
        {{"Q", "W"}, "E"},
        {{"cmd", "alt"}, "left"},
      },
      rightHalf = {
        {{"A", "S"}, "D"},
      },
      undo = false,
      redo = false
    }
    
    spoon.Lunette:bindHotkeys(customBindings)

Contribution

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

Changelog

v0.3.1

Bugfix:

  • fix installation error introduced in v0.3 (@jasperzs)

v0.3

New features:

  • exposing the window resizer API outside of Lunette (@jokajak)
  • adding SpoonInstaller/Make config (@jokajak)

v0.2

Minor bugfixes and improvements:

  • use integer division instead of math.floor (@shayneholmes)
  • fix issue with stuck bottom corner calculations (@shayneholmes)
  • permit multiple mappings per keybinding (@davidosomething)
  • add gitignore
  • add release checklist

v0.1-beta

Initial Release

lunette's People

Contributors

scottwhudson avatar jokajak avatar davidosomething avatar shayneholmes avatar jasperzs avatar subic avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.