Beyond the good ol' LaunchAgents - 7 - xbar plugins

This is part 7 in the series of “Beyond the good ol’ LaunchAgents”, where I try to collect various persistence techniques for macOS. For more background check the introduction.

This technique came from @bradleyjkemp in one of his Twitter posts.

xbar is an application that can put the output of a script into the menubar. The scripts should be placed in ~/Library/Application\ Support/xbar/plugins/. Standard shell scripts are supported, and so I tried the one listed on their GitHub page as an example.

#!/bin/bash

# the current date and time
date

# the current username
echo $USER

# the current user id
id -u

I created a script called script.sh, and dropped it inside the specified folder. Once xbar is run this script will be executed.

Alternating Menubar

It does update the menubar as shown in the gif above, with alternating text.