A simple little script that listens to MPD and sends notifications whenever the playing state changes.
Find a file
Tom Willemse 1bf3786878 Keep running even when MPD isn't
In my current setup ‘mpd-notify’ gets started before ‘mpd’ is fully started, so
at boot it'll immediately get disabled and I'll frequently forget to turn it
back on.
2023-10-06 16:19:51 -07:00
mpd-notify Keep running even when MPD isn't 2023-10-06 16:19:51 -07:00
README.org Initial commit 2023-03-06 00:01:33 -08:00

MPD Notify

A simple script that listens to an mpc idleloop and sends a notification whenever the playing state of MPD changes. This tries to show the album art along with the notification as long as there is one of these files present in the album's directory:

  • cover.jpg
  • cover.jpeg
  • cover.png
  • folder.jpg
  • folder.jpeg
  • folder.png

Requirements

This script needs mpc, libnotify and zsh.

Installation

Put the mpd-notify script anywhere in your $PATH.

Usage

Run the mpd-notify script without arguments. This script assumes that your MPD music directory is $HOME/music and any file path it gets from MPD will be relative to that.

Since this is meant to keep running in the background, you probably want it to do so by calling it as:

mpd-notify &