fix issue of socket connection breaking after a long sleep
fix leaked mpd_statuses
README: add note about AUR package
An MPD client that plays through a song and then pauses for a random period of time before playing the next song, emulating the way games like Minecraft or Dwarf Fortress play their background music.
Note that this is a single-purpose MPD client. You must use another MPD client such as Cantata in order to queue music, manage your library, et al.
Usage: bgm-mpd [-h] [-H host] [-P port] [min time] [max time]
-h Display this help message.
-H host Host IP or socket path to use to connect to MPD. Also supports
the MPD_HOST environment variable.
-P port Port to use to connect to MPD (ignored if using socket file).
Also supports the MPD_PORT environment variable.
min time Minimum time to wait between songs, in seconds. (Default: "20")
max time Maximum time to wait between songs, in seconds. (Default: "90")
Press Control-C at any time in the program's terminal to pause playback, restore
some changed settings, and exit the program.
Use shell redirects and operators to background BGM-MPD in the terminal, hide its various output messages, etc. For example, this will run it in the background so the terminal can be used for other things, but still display its status messages as they're printed:
bgm-mpd &
To cancel the above command,
run the fg
command and then use Control-C as normal.
There is an AUR package: bgm-mpd-git.
You can also download prebuilt x86-64 Linux binary by clicking the latest builds on the CI page: https://builds.sr.ht/~nytpu/bgm-mpd. Artifacts are only saved for 90 days so there unfortunately may be no artifacts available if there has been a gap between pushing new commits or tags. The binaries depend on glibc and libmpdclient.
Or just compile as instructed below, it's as easy as any program you'll ever encounter.
git clone https://git.sr.ht/~nytpu/bgm-mpd
./configure
make
sudo make install
The upstream URL of this project is https://git.sr.ht/~nytpu/bgm-mpd. Send suggestions, bugs, patches, and other contributions to alex@nytpu.com or ~nytpu/public-inbox@lists.sr.ht. For help sending a patch through email, see https://git-send-email.io.
If you aren't comfortable sending a patch through email, get in touch with a link to your repo and I'll pull the changes down myself!
Copyright (C) 2024 nytpu <alex [at] nytpu.com>.
Licensed under the terms of the GNU Affero General Public License,
version 3.
You can view a copy of the GNU AGPL in
LICENSE
or at
https://www.gnu.org/licenses/agpl-3.0.html.