A simple script to make navigating between stacks and windows in Yabai easier. I wrote this as I wanted to be able to use the same keyboard shortcut to navigate between windows and stacks. I found some options listed in this issue but they didn't quite do everything I wanted (specifically rotate at the end of the stacks).
pip install yabai-stack-navigator
Call the script with --next
or --previous
and it'll navigate to the appropriate window/stack. I use skhd and my setup looks like:
alt - h : yabai-stack-navigator --prev
alt - l : yabai-stack-navigator --next
Here's a video of this in action (note, I use the Stackline to help with visualizing stacks).
- Fixed ordering bug with more than one external monitor.
- Added ability to navigate between displays (except when encountering a stack).
- Being a relative Python newbie, I made a mistake in the way I setup the CLI and it resulted in the main.py being added to the root folder of
site-packages
. Upgrading to this version should fix this, but you can double check by seeing ifmain.py
in the pythonsite-packages
folder(e.g./opt/homebrew/lib/python3.x/site-packages/main.py
) matches this code and if it does please remove it. Sorry for the inconvenience.