SFWBAR-MPD(1)

๐Ÿ’– NAME ๐Ÿ’–

okay so bestie, welcome to sfwbar-mpd โ€” the Sfwbar Music Player Daemon module โœจ

  • Filename: mpd.so
  • Requires: libmpdclient

๐ŸŒธ SYNOPSIS ๐ŸŒธ

The Music Player Daemon module gives you a whole interface to control an MPD server. that's it. that's the vibe. ๐ŸŽ€


๐Ÿฆ‹ EXPRESSION FUNCTIONS ๐Ÿฆ‹

Mpd(Query)

The function Mpd queries the state of the MPD server, and it returns a string. no cap. these are the queries it supports:

  • "title" โ€” the title of the current song ๐ŸŽต
  • "track" โ€” the track number of the current song
  • "artist" โ€” the artist of the current song ๐Ÿ‘‘
  • "album" โ€” the album of the current song ๐Ÿ’ฟ
  • "genre" โ€” the genre of the current song
  • "volume" โ€” the current playback volume ๐Ÿ”Š
  • "repeat" โ€” the repeat flag of the current playlist: "1"/"0"
  • "random" โ€” the random flag of the current playlist: "1"/"0" ๐Ÿ”€
  • "queue_len" โ€” the length of the current playlist
  • "queue_pos" โ€” the number of the current song in the playlist
  • "elapsed" โ€” elapsed time since the beginning of the song โณ
  • "length" โ€” the length of the current song
  • "rate" โ€” sample rate of the current song (in kbps)
  • "state" โ€” the state of the player: "play", "pause", "stop", "unknown"

๐Ÿ’… ACTIONS ๐Ÿ’…

MpdSetPassword "Password"

Specify a password used to connect to the MPD server. ๐Ÿ” (yes, <pink>*Password*</pink> is literally the placeholder, keep it in quotes, iykyk)

MpdCommand "Command"

Send a command to the MPD server. these are the supported commands, bestie:

  • "play" โ€” play the current song โ–ถ๏ธ
  • "pause" โ€” pause playback โธ๏ธ
  • "stop" โ€” stop playback โน๏ธ
  • "prev" โ€” switch to the previous song in the playlist โฎ๏ธ
  • "next" โ€” switch to the next song in the playlist โญ๏ธ

โœจ TRIGGERS โœจ

The module defines two triggers, and honestly? iconic.

  • "mpd" โ€” emitted whenever the state of the MPD server changes ๐Ÿ”ฅ
  • "mpd-progress" โ€” emitted every second while the player is in "play" state ๐Ÿ•

GPLv3+


and that's the whole thing, fr fr โ€” this was the SFWBAR-MPD(1) page from the General Commands Manual, and yeah, the footer is just that same SFWBAR-MPD(1) title again saying goodbye. slay. periodt. ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from