====================================== These Scripts Help Install Pianobar (A Command Line Pandora Player) onto Windows and Mac OS X. For Mac I've written a bash script that can be copied and pasted into a terminal emulator of your choice to install pianobar and fix some settings.
The funtionality of the scripts are as follows:
- Fixes a warning that comes up because of an out of date audio library (libao)
- Sets up Auto Login to pianobar using your pandora account ( Otherwise you would have to provide your username and password on every instance of pianobar )
- Sets up Auto Start Station which on start of pianobar will allow you to start a station you set automatically ( otherwise you would need to select the station on every restart of pianobar)
- If you use the advanced installer it will allow for you to set up notifications on changing the song to mac os x banners. And even show album cover art so you know exactly what song is playing without having to go back into the console
This will install pianobar and setup autologin.
bash <(curl -s https://raw.githubusercontent.com/nperez0111/pianobar-installer/master/pianobar-Mac-Simple.sh)
This will install pianobar, setup autologin and add notifications.
bash <(curl -s https://raw.githubusercontent.com/nperez0111/pianobar-installer/master/pianobar-Mac-Advanced.sh)
Make a file called pianobar.cfg
in the same directory that pianobar.exe is in and copy these contents in. Changing as you please.
- If you want a certain station to start every time you open pianobar open up the pandora web player( pandora.com ).
- Select a station you want to be as the auto starting station.
- Copy the URL it will look something like this
http://www.pandora.com/station/play/3195239640586748282
take the mess of numbers at the end and copy that into the pianobar config and that station will now always start with pianobar.
cd ~/.config && mkdir pianobar && cd pianobar && touch config && subl config
What this does is:
- cd into .config folder
- make a directory called pianobar if it does not exist and cd into it
- makes a file called config which stores the configuration
- uses sublime text to open the config file subl can be replaced with open to use any editor you like
- Copy and paste the contents of
pianobar.cfg
into the file and save. Change as you please.
Take out width and height lines as they dont apply in Mac OS
This section will add notifications to pianobar that come up through notification center. Letting you know when the next song is playing.
touch pianobarNotify.rb && subl pianobarNotify.rb && defaults write /usr/local/Cellar/terminal-notifier/1.6.3/terminal-notifier.app/Contents/Info.plist NSAppTransportSecurity '<dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>'
What this does:
- Create a file called
pianobarNotify.rb
. - Sublime Text to edit the new file.
- All the crazy stuff at the end is just to change a setting to allow terminal notifications to include the cover art photo. If not run it will simply not show the cover art. What you need to do:
- Paste in the contents of
pianobarNotify.rb
into your sublime text window close and save - open the config file you made prior (Located as:
~/.config/pianobar/config
or reopen it simply withsubl ~/.config/pianobar/config
) - Add this Line
event_command = ~/.config/pianobar/pianobarNotify.rb
- If you want a custom pandora icon change
~/.config/pianobar/PandoraIco.png
to be the location of your icon in every occurence in thepianobarNotify.rb
file