Git Product home page Git Product logo

mpd-scripts's Introduction

mpd-scripts

sourcehut GitLab mirror GitHub mirror Codeberg mirror

A collection of useful MPD scripts, written in bashism-free POSIX shell.

media-control

media-control wraps Playerctl and mpc. If MPD is running, this "translates" Playerctl commands (play-pause, previous, next) to mpc commands; otherwise, it forwards commands to Playerctl. This is useful for binding XF86Audio* keys to prioritize MPD over other MPRIS players.

When forwarding commands to Playerctl, it adds $HOME/.local/lib to $LD_LIBRARY_PATH and $GI_TYPELIB_PATH if Playerctl has been installed with prefix $HOME/.local

start-music and stop-music

start-music starts MPD and mpd-mpris. stop-music stops these, as well as kunst, cava, ncmpcpp, clerk, cantata-dynamic, and projectM.

MPD, mpd-mpris, and cantata-dynamic are managed by Systemd. Yes, I know, I know...

Smart playlists

Scripts in the "smart-playlists" directory utilize MPD's pseudo-standard "rating" sticker, taking values from 1-10. Programs such as cantata, gmpc, ncmpy, and clerk use this sticker.

mpd-playlist-above-rating takes an integer argument from 0-10, and outputs a playlist containing tracks above the given rating.

mpd-playlist-unrated outputs a list of tracks without a "rating" sticker. This is useful for listening to music in your library you haven't heard yet.

mpd-playlist-smart generates a playlist skewed towards your favorite tracks, intended to be played with shuffle on. The playlist is built according to one rule: the number of times a track appears is equal to its rating minus 5 (or 0, whichever is greater). As a result, tracks must contain a rating of at least 6 to be added. Tracks rated 6/10 appear once, while tracks rated 10/10 appear four times. The higher you rate a track, the more likely it is to be played on shuffle. It requires mpd-playlist-above-rating.

Use rate-track, or the Cantata player to set ratings.

Now Playing

Scripts in the now-playing directory operate on the current track. They display the currently-playing track with some extra info, get/set the track's rating and other stickers, etc.

MPRIS

The mpris/ directory has scripts that work with MPRIS rather than directly through mpd. They combine well with a program such as mpd-mpris to bridge mpd and MPRIS.

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.