stumpwm.stumpwm-contrib/minor-mode/mpd
Tom Hunt 66d672e2d3 Fix bug with dangling timers
In certain cases, usually around loss of connection to the network, it
was possible for the MPD connection to be dropped while *mpd-timer*
was still active and scheduled. This led to mpd-ping being called
on the timer every *mpd-timeout* seconds, and uselessly popping up an
error message.

This fixes that bug by replacing the simple mpd-ping call in the timer
with a lambda that checks for *mpd-socket* and, if not connected,
cancels the timer. It also makes mpd-disconnect cancel the timer
outside the with-mpd-connection form, which means that in the case of
a dangling timer mpd-disconnect will still cancel it.
2022-07-13 11:58:37 -06:00
..
mpd.asd Added meaningful descriptions to all non-documented modules 2018-03-15 22:34:26 -04:00
mpd.lisp Fix bug with dangling timers 2022-07-13 11:58:37 -06:00
package.lisp Adding initial packages 2014-03-01 23:05:30 -05:00
README.org Update URL to MPD protocol's documentation 2017-01-08 00:26:02 +02:00

Usage

Put:

    (load-module "mpd")

into your ~/.stumpwmrc

Then you can use "%m" in your mode line format, as well as various commands defined at the end of the file.

You can customize the modeline format (mpd-modeline-fmt), the status message displayed by the command mpd-status (mpd-status-fmt; note that this is also used on the modeline), and the status message displayed by the command mpd-current-song (mpd-current-song-fmt). See the documentation for mpd-modeline-fmt for more information.

Notes

See The Music Player Daemon protocol for more details.

Tasks

TODO Implement optional shortening for formatting functions

TODO Implement notification window on song change etc…