Qball's Weblog

Beati pauperes spiritu

GMPC Command Line

I integrated the easy-command line into GMPC as a small command line.

You can use this command line to quickly play a song, search for something, etc. This was already available in a popup, but I preferred to integrate it in the main GUI. Let me know if you think I should add more commands to it.

Commands:

(might not be up2date)

Switch

  • switch play queue: Switch to play queue

  • switch metadata browser: Switch to the metadata browser

  • switch search: Switch to the search browser

Main

  • quit: Quit gmpc
  • hide: Hide gmpc
  • show: Show gmpc
  • show notification: Show the tray-icon notification. (if enabled)

Playback

  • play: start playback
  • pause: pause playback
  • next: next song
  • prev: previous song
  • stop: stop playback
  • random (on|off): Random (on|off)
  • repeat (on|off): Repeat (on|off)
  • volume [+–]?[0-9]+: Volume
  • mute: Mute
  • play .*: Play

0.18.1:

  • seek hh:mm:ss: Seek to position
  • seek +hh:mm:ss: Seek relative to current position
  • seek -hh:mm:ss: Seek backwards relative to current position

Requires gmpc 0.18.1 and mpd 0.15.0:

  • repeat current song: Repeats the currently playing song forever
  • stop after current song: Stops playback after current song.
  • consume (on|off)
  • single (on|off)

Play-Queue Manipulation

  • add .*: Add
  • replace .*: Replace
  • Clear play queue: Clear play queue

0.18.1:

  • Crop current song: Clears the whole play queue without removing the current playing song.
  • url [a-Z]://.*: add url.

Search

  • search database .*: Search database
  • search playlist .*: Search playlist

Metadata Browser

  • show current song: Show the page of the current playing song.
  • show current artist: Show the page of the current playing artist.
  • show current album: Show the page of the current playing album.

Query’s

The syntax consist of the following:

<field>=<value>

This will search for value in the field field.

The following fields are supported:

  • artist
  • album
  • title
  • track
  • Name (applies to streams)
  • Genre
  • Date
  • Composer
  • Performer
  • Comment
  • Disc
  • Filename
  • AlbuArtist
  • Any (searches all the above fields)

This search is tokenized and case insensitive, so for example:

artist=eric clapton

Will match both “eric clapton”, “Clapton, Eric”. To stop this tokenization wrap the values in (). For example:

artist=(Eric Clapton)

Will not match “Clapton, Eric”.

 

To refine you search multiple queries can be concattenated:

for example:

artist=Eric Clapton album=Slowhand

There is also an option to run multiple queries at once by using the or operator ||:

artist=Eric Clapton || artist=Norah Jones

This will return all songs by Eric Clapton and Norah Jones.

Chaining

You can chain multiple commands by using ‘;

Key bindings:

  • Escape: Close the command line.
  • Backspace: (if empty) close the command line.
  • Enter: Execute the command.