Skip to content

tkapias/bemenu-mpdcli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bemenu-mpdcli

A bemenu client for MPD using mpc. Control you local or remote Music Player Daemon from a simple and fast menu.

preview

The preview uses my wrapper for bemenu: bemenu-orange-wrapper.

Dependencies

Optional

Installation

Dependencies

  1. Follow bemenu-orange-wrapper instructions.

  2. Next:

# GNU awk, exiftool, xclip, mpd, mpc
sudo apt install gawk libimage-exiftool-perl xclip mpd mpdris2 mpc

bemenu-mpdcli

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

Features

  • 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.

Usage

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]

Lyrics

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

Integrations

  • Binding example for bemenu-mpdcli in i3wm:
bindsym $mod+m exec --no-startup-id "bemenu-mpdcli"

About

A simple bemenu client for MPD using mpc.

Topics

Resources

License

Stars

Watchers

Forks

Languages