I’m primarily a Linux user these days, but due to work I’ve been using a Mac more regularly. One of my favorite things about Linux is i3, and I wanted to recreate my flow using yabai. While Yabai gets me most of what I miss from i3, there were things missing that added a little thrash when swapping between OS’s during the day.
Specifically – I missed the way stacks worked in i3wm as it’s a regular part of my flow. In Yabai, there is stack support, but it seemed limited and required a few more steps than i3. To move between windows in Yabai, there are two different commands for moving between a windowed layout versus a stack layout (in i3 there’s just one).
There are some skhd bindings that somewhat work(link), but they don’t work once you hit the start/end the window stack. This makes quickly hitting the same navigation key to find a window a little bit more jarring as I’m used to being able to do that on Linux. In Yabai, I’d hit the key a few times and sometimes would realize I got stuck at the head/tail node.
To alleviate this, I wrote a small command line utility(yabai-stack-navigator). All the CLI does is let you call
--next and it will move between windows(when not stacked), or move between stacked windows(and rotate to the other side when it hits the beginning or end).
More details at: