2019-08-26 15:23:07 +01:00
waybar-mpd(5)
# NAME
waybar - mpd module
# DESCRIPTION
2019-08-27 10:40:19 +01:00
The * mpd * module displays information about a running "Music Player Daemon" instance.
2019-08-26 15:23:07 +01:00
# CONFIGURATION
Addressed by * mpd *
* server * : ++
2019-12-28 20:14:33 -08:00
typeof: string ++
The network address or Unix socket path of the MPD server. If empty, connect to the default host.
2019-08-26 15:23:07 +01:00
* port * : ++
2019-12-28 20:14:33 -08:00
typeof: integer ++
The port MPD listens to. If empty, use the default port.
2019-08-26 15:23:07 +01:00
2020-10-19 11:54:36 -07:00
* password * : ++
typeof: string ++
The password required to connect to the MPD server. If empty, no password is sent to MPD.
2019-08-26 15:23:07 +01:00
* interval * : ++
2019-12-28 20:14:33 -08:00
typeof: integer++
default: 5 ++
The interval in which the connection to the MPD server is retried
2019-08-26 15:23:07 +01:00
* timeout * : ++
2019-12-28 20:14:33 -08:00
typeof: integer++
default: 30 ++
The timeout for the connection. Change this if your MPD server has a low `connection_timeout` setting
2019-08-26 15:23:07 +01:00
* unknown-tag * : ++
2019-12-28 20:14:33 -08:00
typeof: string ++
default: "N/A" ++
The text to display when a tag is not present in the current song, but used in `format`
2019-08-26 15:23:07 +01:00
* format * : ++
2019-12-28 20:14:33 -08:00
typeof: string ++
default: "{album} - {artist} - {title}" ++
2019-10-15 09:24:04 -07:00
Information displayed when a song is playing.
2019-08-26 15:23:07 +01:00
* format-stopped * : ++
2019-12-28 20:14:33 -08:00
typeof: string ++
default: "stopped" ++
Information displayed when the player is stopped.
2019-08-26 15:23:07 +01:00
2019-10-15 09:24:04 -07:00
* format-paused * : ++
typeof: string ++
This format is used when a song is paused.
2019-08-26 15:23:07 +01:00
* format-disconnected * : ++
2019-12-28 20:14:33 -08:00
typeof: string ++
default: "disconnected" ++
Information displayed when the MPD server can't be reached.
2019-08-26 15:23:07 +01:00
* tooltip * : ++
2019-12-28 20:14:33 -08:00
typeof: bool ++
default: true ++
Option to disable tooltip on hover.
2019-08-26 15:23:07 +01:00
* tooltip-format * : ++
2019-12-28 20:14:33 -08:00
typeof: string ++
default: "MPD (connected)" ++
Tooltip information displayed when connected to MPD.
2019-08-26 15:23:07 +01:00
* tooltip-format-disconnected * : ++
2019-12-28 20:14:33 -08:00
typeof: string ++
default: "MPD (disconnected)" ++
Tooltip information displayed when the MPD server can't be reached.
2019-08-26 15:23:07 +01:00
2021-01-30 18:04:59 -08:00
* artist-len * : ++
2023-02-16 19:41:24 +07:00
typeof: integer ++
Maximum length of the Artist tag.
2021-01-30 18:04:59 -08:00
* album-len * : ++
2023-02-16 19:41:24 +07:00
typeof: integer ++
Maximum length of the Album tag.
2021-01-30 18:04:59 -08:00
* album-artist-len * : ++
2023-02-16 19:41:24 +07:00
typeof: integer ++
Maximum length of the Album Artist tag.
2021-01-30 18:04:59 -08:00
* title-len * : ++
2023-02-16 19:41:24 +07:00
typeof: integer ++
Maximum length of the Title tag.
2021-01-30 18:04:59 -08:00
2019-08-26 15:23:07 +01:00
* rotate * : ++
2019-12-28 20:14:33 -08:00
typeof: integer ++
2024-09-08 13:33:52 +02:00
Positive value to rotate the text label (in 90 degree increments).
2019-08-26 15:23:07 +01:00
* max-length * : ++
2019-12-28 20:14:33 -08:00
typeof: integer ++
The maximum length in character the module should display.
2019-08-26 15:23:07 +01:00
2021-02-01 08:34:51 -08:00
* min-length * : ++
2023-02-16 19:41:24 +07:00
typeof: integer ++
2023-10-21 21:15:25 +05:30
The minimum length in characters the module should accept.
2021-02-01 08:34:51 -08:00
* align * : ++
2023-02-16 19:41:24 +07:00
typeof: float ++
2024-03-04 20:00:57 +01:00
The alignment of the label within the module, where 0 is left-aligned and 1 is right-aligned. If the module is rotated, it will follow the flow of the text.
* justify * : ++
typeof: string ++
The alignment of the text within the module's label, allowing options 'left', 'right', or 'center' to define the positioning.
2021-02-01 08:34:51 -08:00
2019-08-26 15:23:07 +01:00
* on-click * : ++
2019-12-28 20:14:33 -08:00
typeof: string ++
Command to execute when clicked on the module.
* on-click-middle * : ++
typeof: string ++
Command to execute when middle-clicked on the module using mousewheel.
2019-08-26 15:23:07 +01:00
* on-click-right * : ++
2019-12-28 20:14:33 -08:00
typeof: string ++
2023-10-21 21:15:25 +05:30
Command to execute when you right-click on the module.
2019-08-26 15:23:07 +01:00
2020-04-12 18:35:41 +02:00
* on-update * : ++
typeof: string ++
Command to execute when the module is updated.
2019-08-26 15:23:07 +01:00
* on-scroll-up * : ++
2019-12-28 20:14:33 -08:00
typeof: string ++
Command to execute when scrolling up on the module.
2019-08-26 15:23:07 +01:00
* on-scroll-down * : ++
2019-12-28 20:14:33 -08:00
typeof: string ++
Command to execute when scrolling down on the module.
2019-08-26 15:23:07 +01:00
* smooth-scrolling-threshold * : ++
2019-12-28 20:14:33 -08:00
typeof: double ++
Threshold to be used when scrolling.
2019-08-26 15:23:07 +01:00
* state-icons * : ++
2019-12-28 20:14:33 -08:00
typeof: object ++
default: {} ++
Icon to show depending on the play/pause state of the player (*{ "playing": "...", "paused": "..." }*)
2019-08-26 15:23:07 +01:00
* consume-icons * : ++
2019-12-28 20:14:33 -08:00
typeof: object ++
default: {} ++
Icon to show depending on the "consume" option (*{ "on": "...", "off": "..." }*)
2019-08-26 15:23:07 +01:00
* random-icons * : ++
2019-12-28 20:14:33 -08:00
typeof: object ++
default: {} ++
Icon to show depending on the "random" option (*{ "on": "...", "off": "..." }*)
2019-08-26 15:23:07 +01:00
* repeat-icons * : ++
2019-12-28 20:14:33 -08:00
typeof: object ++
default: {} ++
Icon to show depending on the "repeat" option (*{ "on": "...", "off": "..." }*)
2019-08-26 15:23:07 +01:00
* single-icons * : ++
2019-12-28 20:14:33 -08:00
typeof: object ++
default: {} ++
Icon to show depending on the "single" option (*{ "on": "...", "off": "..." }*)
2019-08-26 15:23:07 +01:00
2024-05-28 20:42:12 +02:00
* menu * : ++
typeof: string ++
Action that popups the menu.
* menu-file * : ++
typeof: string ++
Location of the menu descriptor file. There need to be an element of type
GtkMenu with id *menu*
* menu-actions * : ++
typeof: array ++
The actions corresponding to the buttons of the menu.
2024-10-30 17:04:13 +01:00
* expand * : ++
typeof: bool ++
default: false ++
Enables this module to consume all left over space dynamically.
2019-08-26 15:23:07 +01:00
# FORMAT REPLACEMENTS
## WHEN PLAYING/PAUSED
* {artist} * : The artist of the current song
* {albumArtist} * : The artist of the current album
* {album} * : The album of the current song
* {title} * : The title of the current song
* {date} * : The date of the current song
2021-04-20 08:25:48 +02:00
* {volume} * : The current volume in percent
2019-08-26 15:23:07 +01:00
* {elapsedTime} * : The current position of the current song. To format as a date/time (see example configuration)
* {totalTime} * : The length of the current song. To format as a date/time (see example configuration)
2020-09-13 17:32:00 +02:00
* {songPosition} * : The position of the current song.
* {queueLength} * : The length of the current queue.
2024-12-28 13:58:19 +01:00
* {uri} * : The URI of the song relative to the MPD music directory.
* {filename} * The last part of the URI.
2023-10-21 21:15:25 +05:30
* {stateIcon} * : The icon corresponding to the playing or paused status of the player (see * state-icons * option)
2019-08-26 15:23:07 +01:00
* {consumeIcon} * : The icon corresponding the "consume" option (see * consume-icons * option)
* {randomIcon} * : The icon corresponding the "random" option (see * random-icons * option)
* {repeatIcon} * : The icon corresponding the "repeat" option (see * repeat-icons * option)
* {singleIcon} * : The icon corresponding the "single" option (see * single-icons * option)
## WHEN STOPPED
* {consumeIcon} * : The icon corresponding the "consume" option (see * consume-icons * option)
* {randomIcon} * : The icon corresponding the "random" option (see * random-icons * option)
* {repeatIcon} * : The icon corresponding the "repeat" option (see * repeat-icons * option)
* {singleIcon} * : The icon corresponding the "single" option (see * single-icons * option)
## WHEN DISCONNECTED
Currently, no format replacements when disconnected.
# EXAMPLES
```
"mpd": {
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ",
"format-disconnected": "Disconnected ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"interval": 2,
"consume-icons": {
"on": " " // Icon shows only when "consume" is on
},
"random-icons": {
"off": "<span color=\"#f53c3c\"></span> ", // Icon grayed out when "random" is off
"on": " "
},
"repeat-icons": {
"on": " "
},
"single-icons": {
"on": "1 "
},
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
}
```
# STYLE
- * #mpd *
- * #mpd.disconnected *
- * #mpd.stopped *
- * #mpd.playing *
- * #mpd.paused *