Coder Social home page Coder Social logo

hammerspoon-alttab's Introduction

hammerspoon-alttab

alttab is Hammerspoon powered alternative window switcher.

Why?

As a developer, I spend most of my time in terminal and browser, constantly switching between them. This extension has been written so I can avoid switching to Finder, somehow it always finds (hence a name) a way to annoy me.

Finder is always there

Installation

  • Install Hammerspoon

  • git clone this repository to ~/.hammerspoon config directory:

    git clone https://github.com/selectnull/hammerspoon-alttab.git ~/.hammerspoon/hammerspoon-alttab

Configuration

Add these lines to your ~/.hammerspoon/init.lua file:

local alttab = require("hammerspoon-alttab")
alttab.registerDefaultBindings('.')

This will set the following default key bindings:

  • cmd+. to switch to next window
  • cmd+alt+. to add or remove currently focused window to cycle list
  • cmd+ctrl+alt+. to display debug info in Hammerspoon console

Instead of . you may use any other key, just pass it to registerDefaultBindings method.

You might also not like default modifiers used by registerDefaultBindings. In that case, you can register your own:

local alttab = require("hammerspoon-alttab")
hs.hotkey.bind({"alt"}, "tab", alttab.focusNext)
hs.hotkey.bind({"alt", "shift"}, "tab", alttab.toggleWindow)
hs.hotkey.bind({"alt", "ctrl", "shift"}, "tab", alttab.debug)

Contribution

Comments, bug reports, and pull requests are welcomed.

Released under MIT license.

hammerspoon-alttab's People

Contributors

muescha avatar selectnull avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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