~tomleb/mpdnotify

A daemon listening to mpd events
d4582ae3 — Tom Lebreux 2 years ago
Add timeout to try connection multiple time
e0a1a383 — Tom Lebreux 2 years ago
Extract connection
eb583d27 — Tom Lebreux 2 years ago
Add README

clone

read-only
https://git.sr.ht/~tomleb/mpdnotify
read/write
git@git.sr.ht:~tomleb/mpdnotify

You can also use your local clone with git send-email.

#mpdnotify

Listen for mpd events.

#How To

To run the daemon, execute the following command where script points to a script that will be run on new events.

$ mpdnotify <script>

#Install

$ make
$ sudo make install

#Example

Below is an example of a script that can be run. For more information, see the man page.

#!/bin/sh
song="$(mpc --format '%title%' | head -1)"
if [ "$MPD_STATE_NAME" = "MPD_STATE_PLAY" ]; then
    notify-send "Playing" "$song"
fi

#Dependencies

mpdnotify requires libmpdclient installed.

#License

See COPYING