Customize the Toolbar (Mac OSX/Bash/Ruby)

Fri 19 Feb 2021
Reading time: (~ mins)

A few weeks ago I came across a great project called BitBar. It allows you to easily display custom scripts on your menu bar. I won't repeat the installation and usage details which you can find here.

My menu bar now:

From left to right

Currently Playing Music:


# Show music playing from my custom music program:
ps u | grep afplay | grep -v grep | rev | cut -d/ -f1 | cut -d. -f2-10 | rev

Total CPU Utilization:


# Usage across all CPUS
ps -A -o %cpu | awk '{s+=$1} END {print s "%"}'

Default Battery Charge Indicator...

Internet Status:


# See internet connectivity status
ping -o -t 1 > /dev/null 2>&1
if [ $? -eq 0 ];
echo "OK"
echo -e "${RED}ERR"



# How many Saturdays I have left to live:
puts (3_900 - ( -, 10, 20)) / 604_800).round

Default Time, Search and Notification Center Icons...

I love the simplicity behind BitBar. Enjoy :)

Questions? Free free to contact me anytime :)

Get Notified of Future Posts