https://github.com/selectnull/hammerspoon-alttab
https://github.com/selectnull/hammerspoon-alttab
hammerspoon plugin
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/selectnull/hammerspoon-alttab
- Owner: selectnull
- License: mit
- Created: 2016-06-11T11:10:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-29T17:14:13.000Z (over 9 years ago)
- Last Synced: 2025-04-26T03:50:19.851Z (9 months ago)
- Topics: hammerspoon, plugin
- Language: Lua
- Size: 193 KB
- Stars: 19
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
hammerspoon-alttab
==================
alttab is [Hammerspoon](http://www.hammerspoon.org/) 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.

Installation
------------
* Install [Hammerspoon](http://www.hammerspoon.org/)
* 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.