From 364b2d3a62ec410684def4d77e27b25733d1ec4b Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Fri, 1 Sep 2017 12:42:20 +1000 Subject: [PATCH] Add mpd-notify-bitbar daemon to refresh BitBar's display instantly when mpd's state changes --- .../me.00dani.mpd-notify-bitbar.plist | 24 +++++++++++++++++++ local/bin/mpd-notify-bitbar | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 Library/LaunchAgents/me.00dani.mpd-notify-bitbar.plist create mode 100755 local/bin/mpd-notify-bitbar diff --git a/Library/LaunchAgents/me.00dani.mpd-notify-bitbar.plist b/Library/LaunchAgents/me.00dani.mpd-notify-bitbar.plist new file mode 100644 index 0000000..0fa175b --- /dev/null +++ b/Library/LaunchAgents/me.00dani.mpd-notify-bitbar.plist @@ -0,0 +1,24 @@ + + + + + KeepAlive + + OtherJobActive + + homebrew.mxcl.mpd + + + + Label + me.00dani.mpd-notify-bitbar + ProgramArguments + + zsh + -lc + exec mpd-notify-bitbar + + RunAtLoad + + + diff --git a/local/bin/mpd-notify-bitbar b/local/bin/mpd-notify-bitbar new file mode 100755 index 0000000..f519b34 --- /dev/null +++ b/local/bin/mpd-notify-bitbar @@ -0,0 +1,4 @@ +#!/bin/bash +while mpc idle; do + open bitbar://refreshPlugin?name=mpd* +done