PianoKeys — Control Pianobar using your Mac's media keys
I was really annoyed that I couldn't control Pianobar using the media keys on my Mac, so I wrote an app that does it.
- Pause/play will do what it's supposed to
- Hold the pause/play key to "love" a track
- Fast forward will also do what it's supposed to
- Hold the fast forward key to "ban" a track
- PianoKeys will automatically terminate after Pianobar closes
You should be able to just open the Xcode project and build. I developed the app using Xcode 4.2.
The installation requires a few steps, but it's pretty easy to get up and running, here's what you need to do:
Add this to your Pianobar configuration file (
fifo = /Users/USERNAME/.config/pianobar/ctl
Create the file pipe
If you have Xcode: Install the application using Xcode from terminal
# From the project root directory xcodebuild -configuration Release install # installs into /usr/local/bin
If you downloaded the binary: Copy the
pianokeysbinary into your $PATH (e.g.
cp ./pianokeys /usr/local/bin
(Optional) Create a cool alias to start PianoKeys when you start Pianobar
# Add this to your shell's rc file (e.g. ~/.bashrc) alias pianobar='pianokeys && pianobar'
That's it! You should be able to start
Note: PianoKeys will terminate itself if Pianobar is not running after 5 seconds— just keep that in mind when starting it up.