Displays the current song playing with MPV in your tmux status bar. When playback is paused, a pause icon is displayed next to the artist.
Dependencies:
- socat
- jq
Edit your .tmux.conf and append the plugin to your TPM list.
set -g @plugin 'feqzz/tmux-mpv-info'Remember to hit <prefix> + I to install the plugin.
Clone the repo:
git clone https://github.com/feqzz/tmux-mpv-info ~/.tmux/Edit your .tmux.conf and add this line at the bottom.
run-shell ~/.tmux/tmux-mpv-info/tmux-mpv-info.tmuxLast step is to reload the tmux config file.
tmux source-file ~/.tmux.confEdit your .tmux.conf file and add #{mpv_info} to your status-right. Simple example:
set -g status-right "#{mpv_info}"As the length of some song titles can be very long, it can be useful to add this line to your .tmux.conf to avoid overflow.
set -g status-right-length 200To actually use the plugin with mpv, a mpvsocket has to be initiated in /tmp/mpvsocket. This can easily be done by adding this flag:
mpv song.flac --input-ipc-server=/tmp/mpvsocketPersonally I have added this flag permanently to my mpv.conf.
input-ipc-server=/tmp/mpvsocket