Add mpd-notify-bitbar daemon to refresh BitBar's display instantly when mpd's state changes

This commit is contained in:
Danielle McLean 2017-09-01 12:42:20 +10:00
parent ca92d0989c
commit 364b2d3a62
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>OtherJobActive</key>
<dict>
<key>homebrew.mxcl.mpd</key>
<true/>
</dict>
</dict>
<key>Label</key>
<string>me.00dani.mpd-notify-bitbar</string>
<key>ProgramArguments</key>
<array>
<string>zsh</string>
<string>-lc</string>
<string>exec mpd-notify-bitbar</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

4
local/bin/mpd-notify-bitbar Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
while mpc idle; do
open bitbar://refreshPlugin?name=mpd*
done