A bemenu client for MPD using mpc. Control you local or remote Music Player Daemon from a simple and fast menu.
The preview uses my wrapper for bemenu: bemenu-orange-wrapper.
- MPD
- mpc
- bemenu >= 0.6
- Nerd Fonts (Symbols Only)
- Bash >= 5
- Gnu awk
- xclip
- exiftool
- Debian example with bemenu-orange-wrapper:
-
Next:
# GNU awk, exiftool, xclip, mpd, mpc
sudo apt install gawk libimage-exiftool-perl xclip mpd mpdris2 mpc
git clone --depth 1 https://github.com/tkapias/bemenu-mpdcli.git bemenu-mpdcli
cd bemenu-mpdcli
chmod +x bemenu-mpdcli.bash
- Optional: Symlink to a directory in your user's path:
ln -s $PWD/bemenu-mpdcli.bash $HOME/.local/bin/bemenu-mpdcli
- Display current title, albumartist (or url/filename).
- Player commands: Play/Pause, Stop, Prev, Next.
- Queue:
- List position, title, albumartist, album (or url/filename).
- Play selected.
- Playlists:
- List mpd playlists by filename.
- Replace queue with a playlist and play it.
- Library:
- List albumartist.
- List albums for a selected albumartist.
- Replace queue with an album and play it.
- Lyrics:
- Display lyrics included in current song's file.
- Parse SynchronizedLyricsText-xxx or Lyrics-xxx tags.
- Prefer Synchronized Lyrics if available.
- Seek position in current song from a line in Synchronized Lyrics.
bemenu-mpdcli shoould work out of the box for a local mpd server.
You can also provide arguments to mpc for custom locations.
[MPD_LIBRARY_PATH=$HOME/Music] bemenu-mpdcli [--host ip/socket] [--port num] [--partition name]
For the lyrics extraction to work, you need exiftool and a way for
bemenu-mpdcli to locate the root folder of the MPD library.
You can declare the path to this folder as the env variable
MPD_LIBRARY_PATH
or let it use XDG_MUSIC_DIR by default if it's defined
by your session manager.
You can also source your custom XDG user directories in your .profile
,
.xsession
or .bashrc
files:
# set -a to export the sourced variables
set -a
. ${HOME}/.config/user-dirs.dirs
set +a
- Binding example for bemenu-mpdcli in i3wm:
bindsym $mod+m exec --no-startup-id "bemenu-mpdcli"