Skip to content

GoHarder/tmux-pianobar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmux-pianobar

A convenient status and menu to play pianobar in tmux.

screen shot

Installing

Via TPM (recommended)

The easiest way to install tmux-pianobar is via the Tmux Plugin Manager.

  1. Add plugin to the list of TPM plugins in .tmux.conf:

    set -g @plugin 'GoHarder/tmux-pianobar'
  2. Use prefixI install tmux-pianobar. You should now be ready to connect tmux-pianobar.

  3. When you want to update tmux-pianobar use prefixU.

Manual Installation

  1. Clone the repository

    $ git clone https://github.com/tmux-plugins/tmux-pianobar ~/clone/path
  2. Add this line to the bottom of .tmux.conf

    run-shell ~/clone/path/yank.tmux
  3. Reload the tmux environment

    # type this inside tmux
    $ tmux source-file ~/.tmux.conf

You should now be ready to connect tmux-pianobar.

Connection to pianobar

This plugin uses pianobar's events feature to update player information. This is to prevent constant buffer copying.

Inside the pianobar config file there is an option called event_command insert the location of the plugins events script.

event_command = [your home directory]/.tmux/plugins/pianobar/scripts/radio/scripts/events.sh

Requirements

In order for tmux-pianobar to work, you must have pianobar installed.

Configuration

Status

To view the song information insert #{radio} inside status right.

st_radio="#[bg=color248#,fg=black]#{radio}"
st_time="#[bg=white,fg=black]  %I:%M%p "
st_date="#[bg=color208,fg=black]  %m/%d/%Y #[default]"

set -g status-right "$st_radio$st_time$st_date"

Key bindings

Currently the menu is bound to Alt/. Hopefully in future updates there will be options to rebind this inside the tmux config file

TODO

There are plenty of upgrades that can be done to this plugin. There are some pianobar controls that are not inserted into the menu. If you need advanced options currently you can view the feed from the radio menu.

Theres also the option to put the track data in other places than the right status.

About

Status bar and menu to run pianobar in tmux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages