Mac toolbar widgets with xbar and rust

submited by
Style Pass
2025-01-18 20:00:03

January 18, 2025 3 minute read

(aside - I have some much bigger blog ideas but haven’t had the time to write them properly - so here’s just a small thing I find handy)

XBar is a nifty tool for Mac OSX machines which puts little UI widgets on your toolbar. (It started as an older project called Bitbar, which was abandoned for a while - there is a similar alternative called SwiftBar for those who want options)

One of the marvellous things about XBar is how very simple it is. It very much follows the “Unix philosophy” - every plugin is a very simple executable script - if it succeeds (e.g. exit status 0) then the STDOUT is parsed and used to display a toolbar widget. If it fails, then STDOUT is parsed and displayed on an error widget.

If you copy the above to an executable file in ~/Library/Application\ Support/xbar/plugins/ow.1m.sh and refresh XBar, it will show up as a little drop-down menu:

Leave a Comment