Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/richin13/tmux-plugin-playerctl
Display MPRIS metadata in Tmux (Spotify, Clementine, VLC, etc)
https://github.com/richin13/tmux-plugin-playerctl
banshee clementine mpris playerctl spotify tmux vlc
Last synced: 3 months ago
JSON representation
Display MPRIS metadata in Tmux (Spotify, Clementine, VLC, etc)
- Host: GitHub
- URL: https://github.com/richin13/tmux-plugin-playerctl
- Owner: richin13
- License: mit
- Created: 2019-06-28T03:28:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-29T20:30:54.000Z (8 months ago)
- Last Synced: 2024-04-18T15:08:32.523Z (7 months ago)
- Topics: banshee, clementine, mpris, playerctl, spotify, tmux, vlc
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tmux - tmux-plugin-playerctl - spec/) metadata in Tmux (Spotify, Clementine, VLC, etc) (Status Bar)
README
# tmux-plugin-playerctl
A tmux plugin for using [playerctl](https://github.com/acrisci/playerctl) to display [MPRIS](https://www.freedesktop.org/wiki/Specifications/mpris-spec/) meta-data about the music currently playing.
## Pre-requisites
Make sure you have *playerctl* & *bash* installed.
```bash
# If you're in Arch
sudo pacman -S playerctl
```See [playerctl](https://github.com/acrisci/playerctl#installing)'s instructions to get more details about installing it in other OS.
## Installation
### Installation with [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) (recommended)
Add plugin to the list of TPM plugins in `.tmux.conf`:
```
set -g @plugin 'richin13/tmux-plugin-playerctl'
```Hit `prefix + I` to fetch the plugin and source it.
If format strings are added to `status-right`, they should now be visible.
### Manual installation
Clone the repository
```bash
git clone https://github.com/richin13/tmux-plugin-playerctl ~/path/to/local/repo
```Add the following line to your `.tmux.conf`:
```bash
run-shell ~/path/to/local/repo/playerctl.tmux
```## Usage
The currently available options are:
- `#{playerctl_artist}`: Display the song's artist information
- `#{playerctl_title}`: Display the song's title information
- `#{playerctl_album}`: Display the song's album information
- `#{playerctl_full}`: Display the song info in the format [Artist] - [Title]
- `#{playerctl_short}`: Display the song info in the format [Artist] - [Title] but trimmed
to a max number of characters (default: 30)Just add the desired option to your `.tmux.conf` like this:
```bash
set -g status-right "#{playerctl_full}"
```## Settings
Available settings for `playerctl_short` (shown values are the defaults):
```bash
#: Number of characters to show
set -g @short_length "30"#: Character(s) to append at the end of the trimmed song name
set -g @short_append_chars "..."
```## License
See [LICENSE](./LICENSE)