Coder Social home page Coder Social logo

hammerspoon's Introduction

Hammerspoon

This configuration provide a lot of hotkeys for productivity without change established habits.

Install

Improve window hints

Make the window hints to fixed hotkey

Hotkey generation algorithm as below:

  • try to find char in user specific dict, like { ['com.sublimetext.3'] = 'S' }
  • parse the bundleID to single char, like com.apple.Terminal -> 'T', bundleID is stable than title
  • loop the charhints(i.e ABC..XYZ), find the nil char in 'dict'

screenshot

Emacs style hotkeys

This configuration heavily uses Emacs style hotkey binding, i.e., using the prefix to activate hotkeys. The default prefix is ctrl+,, e.g., prefix - w = press and release ctrl+, first, then press w.

  • prefix - ?: help.
  • prefix - g: show a 3x3 grid for resizing window.
  • prefix - w: switcher for windows(while system switcher for application).
  • prefix - c: toggle caffeinate (disable sleep).
  • prefix - s: sleep.
  • prefix - n: toggle night shift.
  • prefix - r: reload Hammerspoon config.
  • prefix - d: toggle Hammerspoon console for debug.
  • prefix - m: enter mouse mode, then you can use hjkl to move the mouse, use cmd+hjkl to move slowly, use shift+hjkl to scroll, use u, i, o to perform left, right, middle button click.

Normal Keymaps

The option key is used for inputing special characters, may mapping option key be a better offer.

  • option [ + shift ] + tab: switch windows.
  • option + npfb: arrow keys.
  • option + ctrl + npfb: option + arrow keys (move faster).
  • option + a: home.
  • option + e: end.
  • option + u: page_up.
  • option + d: page_down.
  • option + [/]: cmd [+ shift] + tab (switch tabs).
  • option + q: esc.
  • option + m / option + 1: play.
  • option + < / option + 2: previous track.
  • option + > / option + 3: next track.
  • option + / / option + f1: mute.
  • option + , / option + f2: volume down.
  • option + . / option + f3: volume up.
  • press ctrl twice: escape
  • press cmd Q twice: quit app, in order to prevent accidentally quitting an app when pressing cmd+q.

Thanks to

https://github.com/Hammerspoon/hammerspoon/wiki/Sample-Configurations https://github.com/raulchen/dotfiles/tree/master/hammerspoon https://github.com/agzam/spacehammer https://github.com/SeanXP/dotfiles/tree/master/hammerspoon

hammerspoon's People

Stargazers

lxr avatar Dolia Wu avatar

Watchers

Cxd 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.