Spoon for assigning windows on your number keys to switch between them.
-
Get started with Hammerspoon. Follow the Setup section on Getting Started with Hammerspoon page.
-
Find your hammerspoon script directory. It will likely be
$HOME/.hammerspoonafter installation. -
Download and save
WinSwitch.spoondirectory to:{your-hammerspoon-path}/Spoons/WinSwitch.spoon -
In your
init.luafile, you should import the spoon as follows:
hs.loadSpoon('WinSwitch')Reload your hammerspoon config and you're ready to go 😎
For dev workflow, it is recommended that you symlink WinSwitch.spoon to ${HOME}/.hammerspoon/Spoons/WinSwitch.spoon and import it in your init.lua file. Branch out, make changes to the the source code while reloading Hammerspoon. Push and open a PR.
Focus a window, hold ctrl opt cmd shift, then press a number row key. The key is going to be assigned to the window.
Hold ctrl opt cmd shift, then press a number row key. If a window is assigned to the key, it will be focused.