Skip to content

🎵 Displays the current song playing with MPV in your tmux status bar.

License

Notifications You must be signed in to change notification settings

Feqzz/tmux-mpv-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tmux-mpv-info

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.

Installation

Dependencies:

  • socat
  • jq

Installation with Tmux Plugin Manager

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.

Manual

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.tmux

Last step is to reload the tmux config file.

tmux source-file ~/.tmux.conf

Usage

Edit 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 200

MPV

To 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/mpvsocket

Personally I have added this flag permanently to my mpv.conf.

input-ipc-server=/tmp/mpvsocket

License

MIT

About

🎵 Displays the current song playing with MPV in your tmux status bar.

Topics

Resources

License

Stars

Watchers

Forks

Languages