This is a fork from control-pianobar that I hacked a little bit in order to make it work with pianobar and Growl in OS X
UPDATE 12/29/15: Improved support in El Capitan by porting zenity to the seemingly-better-supported CocoaDialog.
The original project can be found at http://bruce-connor.github.io/control-pianobar/. Go there if you require to use this in Linux derivatives!
$ brew install pianobar
-
if the dylib is broken, for instance with p11-kit, just reinstall the lib (brew uninstall p11-kit && brew install p11-kit)
-
if
guile
cannot findGNU libtool
, it might not be linked properly, so run$ brew unlink libtool && brew link libtool
-
Then, reinstall
gnutls
as following$ brew rm gnutls & brew install gnutls $(brew options gnutls | grep -E '^--with-' - | tr '\n' ' ')
-
-
Missing header
neaacdec.h
, you need to install the AAC decoder that comes infaad2
, it may not be linked$ brew unlink faad2 && brew link faad2
-
Sometimes, this is an issue (only realized by using --verbose mode), so reinstall the mad package:
$ brew rm mad & brew install mad
-
Runtime missing library:
$ brew unlink json-c && brew link json-c
Getting pianobar from the pianobar project at github and follow their instructions
-
Get the two bash scripts and put them and pandora.jpg (or any other icon) in your ~/.config/pianobar/ folder
-
Create a symbolic link to
control-painobar.sh
from your~/bin
directory or other folder in yourPATH
variableln -s ~/.config/pianobar/control-pianobar.sh ~/bin/
-
Install Requirements
-
Install the
growlnotify
command by getting it from http://growl.info/downloads -
Install
wget
from Homebrew andcocoadialog
from homebrew-cask:$ brew install wget Caskroom/cask/cocoadialog
-
Verify path to
cocoadialog
binary in~/.config/pianobar/control-pianobar.sh
-
Make a
pidof
script with
```
#!/bin/bash
ps axc|awk "{if (\$5==\"$1\") print \$1}";
```
1. Make it executable with `$ chmod a+x pidof`
1. Save it somewhere in your `$PATH` locations so it can be found
Refer to the original project's website for clearer instructions on how to use control-pianobar
or do key bindings to your keys.
In a nutshell: I use BetterTouchTool to keybind the commands (***not working directly with the bash scripts command) so I made individual AppleScript applications for each command. For example,
In particular, for the initial play script, this works fine for me:
tell application "System Events"
if (count (processes whose bundle identifier is "com.apple.Terminal")) is 0 then
tell application "/Applications/Utilities/Terminal.app"
do script "~/.config/pianobar/control-pianobar.sh p;" in window 0
end tell
else
tell application "/Applications/Utilities/Terminal.app"
do script "~/.config/pianobar/control-pianobar.sh p; exit;"
end tell
end if
end tell
For any other control option, like next
, the AppleScript would like as follows:
tell application "Terminal"
do script ("~/.config/pianobar/control-pianobar.sh next; exit;")
end tell