A crazy customizable Bitbar/SwiftBar plugin that displays the total number of spaces and highlights the current one.
I use the Yabai Window Manager for MacOS. One of the freatures of Yabai is disabling the animation when changing spaces. For power users, this is a great feature that speeds up your workflow. The issue is that sometimes it can be difficult to know which space you're on without the animations. Yabai forked its default bar into SpaceBar; it gives you this information, but it isn't that customizable and requires that the default menu bar be hidden. I have several other utilities in the menubar (such as iStatsMenu and Carrot Weather) and don't want them hidden all the time. Übersicht widgets also wouldn't work for this reason.
This plugin (based on the yabai/skhd helper plugin by James Won) for Bitbar, displays the total number of spaces you have open and highlights the currently focused space.
Yabai, SHKD, Bitbar or SwiftBar, jq, Visual Studio Code, zsh, and brew
Download the yabai.1d.sh file and drop it into the Bitbar plugin folder. For a more in-depth guide, check out the wiki!
[x] Plugin displays "Updating..." text when switching spaces. I believe this is possible to fix but I have not managed to get this to work. Fixed when using SwiftBar.
[ ] Final output needs cleanup to fix:
open 'iTerm' && nvim ~/.yabairc
and set terminal=true
in the echo statement at the bottom. Unfortunately, this is not very reliable.Feel free to make changes and republish as you see fit but please give credit in the form of a link to this page! A lot of sleepless nights were spent on this project and as my first shell script, I'm quite proud of it!