swaybar status script
written 2025-07-09 15:44, edited 2025-05-28 0:56For the last year or so of using sway as my Wayland compositor, I used yambar for my system status. It's wonderfully minimalist and not too much trouble to configure, once you get into YAML's picky indentation, but as of May it's no longer actively developed, so I sought a solution from the randoms of the Internet. What I ended up with is cobbled together from these two sources:
- Spencer Burris, Configuring Swaybar with MPD, Volume, and Weather Display (2021)
- this stack overflow response
I referenced the former for how to grab mpc status
output, and copied the structure of the latter because I understand Python far better than bash. The only real change I've made to it is updating the string format from %s
expressions to f-strings. It looks like
The code is over here.