Home

Awesome

tmux-now-playing

Showing currently playing track in tmux status bar with music controls

Screenshot

Integrations

Configurations

Use #{now_playing} in status-left or status-right to show a currently playing track in supported music player

Status Format

Key Bindings

Update Interval

Music Player

Components

Scrollable Components

When specific component is too long to display (per @now-playing-scrollable-threshold value), it will turned itself into a scrolling one. This scrolling will be padded with 3 spaces and based on the playing position of the current track.

If a component is not exceeding the threshold, it will simply be a static one.

So if the threshold is set to 10 and a song name is This is too long, a {title} component will be shown as...

[00:00] This is to
[00:01] his is too
[00:02] is is too 
[00:03] s is too l
[00:04]  is too lo
[00:05] is too lon
...
[00:09] oo long   
[00:10] o long   T
[00:11]  long   Th
[00:12] long   Thi

Now, if all scrollable component in the {scrollable} component is exceeding the threshold, the whole {scrollable} component itself will be expanded and turned into a scrolling one instead.

Key Bindings

These are default key bindings, you can configure your own key bindings by refer to the configuration section above

Installation

Requirements

Please note that this plugin utilize multiple unix tools to deliver its functionalities (most of these tools should be already installed on most unix systems)

Using TPM

set -g @plugin 'spywhere/tmux-now-playing'

Manual

Clone the repo

$ git clone https://github.com/spywhere/tmux-now-playing ~/target/path

Then add this line into your .tmux.conf

run-shell ~/target/path/now-playing.tmux

Once you reloaded your tmux configuration, all the format strings in the status bar should be updated automatically.

Troubleshoots

Playing status is not update

First, locate the temporary directory that use for storing caches by running

echo "${TMPDIR:-${TMP:-${TEMP:-/tmp}}}"

If the temporary directory located above does not exists, try checking on ~/.tmp.

Then remove all the files under tmux-now-playing-XXX where XXX is any number.

This should remove all the caches which plugin will regenerate itself when needed.

License

MIT