Code Monkey home page Code Monkey logo

tmux-plugin-playerctl's Introduction

tmux-plugin-playerctl

A tmux plugin for using playerctl to display MPRIS meta-data about the music currently playing.

Pre-requisites

Make sure you have playerctl & bash installed.

# If you're in Arch
sudo pacman -S playerctl

See playerctl's instructions to get more details about installing it in other OS.

Installation

Installation with Tmux Plugin Manager (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

git clone https://github.com/richin13/tmux-plugin-playerctl ~/path/to/local/repo

Add the following line to your .tmux.conf:

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:

set -g status-right   "#{playerctl_full}"

Settings

Available settings for playerctl_short (shown values are the defaults):

#: 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

tmux-plugin-playerctl's People

Contributors

richin13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

crpb sjclayton

tmux-plugin-playerctl's Issues

No Issue: Just a big thanks

No Issue, just a big thank you for this plugin.

Got to know about it today here, rothgar/awesome-tmux#81.

Was looking for this kind of functionaliy for a long time. Big fan of mpris and playerctl. Your plugin does the job perfectly. Simple, clean and efficient.

You might just want to add to the README that it requires "bash" and not only "sh" because of "#!/usr/bin/env bash".

Keep up the great work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.