Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Feqzz/tmux-mpv-info
🎵 Displays the current song playing with MPV in your tmux status bar.
https://github.com/Feqzz/tmux-mpv-info
jq mpv-player shell-script socat tmux tmux-plugin
Last synced: 3 months ago
JSON representation
🎵 Displays the current song playing with MPV in your tmux status bar.
- Host: GitHub
- URL: https://github.com/Feqzz/tmux-mpv-info
- Owner: Feqzz
- License: mit
- Created: 2021-03-02T20:27:18.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-03-15T17:03:06.000Z (over 3 years ago)
- Last Synced: 2024-04-18T15:08:16.177Z (7 months ago)
- Topics: jq, mpv-player, shell-script, socat, tmux, tmux-plugin
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tmux - tmux-mpv-info
README
# 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.
![](https://feqzz.no/img/tmux-mpv-info-example.png)## Installation
Dependencies:
* socat
* jq### Installation with Tmux Plugin Manager
Edit your `.tmux.conf` and append the plugin to your TPM list.```tmux
set -g @plugin 'feqzz/tmux-mpv-info'
```
Remember to hit ` + I` to install the plugin.### Manual
Clone the repo:
``` bash
git clone https://github.com/feqzz/tmux-mpv-info ~/.tmux/
```
Edit your `.tmux.conf` and add this line at the bottom.
``` bash
run-shell ~/.tmux/tmux-mpv-info/tmux-mpv-info.tmux
```
Last step is to reload the tmux config file.
``` bash
tmux source-file ~/.tmux.conf
```## Usage
Edit your `.tmux.conf` file and add `#{mpv_info}` to your `status-right`. Simple example:
``` tmux
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.
``` tmux
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:
``` bash
mpv song.flac --input-ipc-server=/tmp/mpvsocket
```
Personally I have added this flag permanently to my `mpv.conf`.
``` bash
input-ipc-server=/tmp/mpvsocket
```
## License
[MIT](LICENSE.md)