Display Git status with TextBar

There’s a cute little OS X app called Heads On Display that shows the current git branch on a particular project. It’s a great idea, and a lightweight app, but is limited to only displaying the branch name.

TextBar is a utility that lets you add any text on the menu bar. It is a slimmed-down GeekTool or Ubersicht for the menu bar. I figured that I could implement Heads on Display’s functionality so it better suited my needs. In addition to TextBar, you’ll need copies of Keyboard Maestro and LaunchBar to emulate my setup.

I put together a couple super short scripts that change the contents of a text file to the git repo directory you want to view in the menu bar. TextBar then slurps up I also added an additional script that will output the current branch into LaunchBar, just for kicks.

Download Git TextBar LaunchBar 6 Actions

The beauty of little text files is that you can make the easiest Keyboard Maestro actions set to the same hotkey to get a pallete that emulates Heads On Display’s menubar selection:

Next, set a TextBar item to run this snippet (replace njlash with your home folder name):

GIT_DIR=`cat /Users/njlash/.ss_branch`; GIT_BASE=`basename $GIT_DIR`; STATUS=`git -C $GIT_DIR symbolic-ref --short HEAD`; echo $GIT_BASE: $STATUS