Simplify shared MPD settings with inheritance

This commit is contained in:
M1dgard 2018-04-17 19:55:16 +02:00
parent fc01cdb19d
commit ef5fce8e32
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -131,6 +131,7 @@ label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding} label-urgent-padding = ${module/bspwm.label-urgent-padding}
[mpd-shared] [mpd-shared]
type = internal/mpd
format-online = <toggle> <icon-prev> <label-song> <icon-next> format-online = <toggle> <icon-prev> <label-song> <icon-next>
icon-prev = icon-prev =
@ -144,106 +145,45 @@ icon-pause-foreground = ${colors.foreground-alt}
icon-next = icon-next =
icon-next-foreground = ${colors.foreground-alt} icon-next-foreground = ${colors.foreground-alt}
label-song = %artist% - %title% label-song = %artist% - %title%
label-song-foreground = ${colors.foreground} label-song-maxlen = 22
label-song-maxlen = 25 small-label-song-maxlen = 7
label-song-ellipsis = true label-song-ellipsis = false
label-song-foreground = ${colors.foreground}
bar-progress-width = 45 bar-progress-width = 25
bar-progress-indicator = | small-bar-progress-width = 10
bar-progress-fill = bar-progress-indicator =
bar-progress-empty = bar-progress-indicator-foreground = #eee
bar-progress-fill =
bar-progress-fill-foreground = #999
bar-progress-empty =
bar-progress-empty-foreground = #333
; {{{ nothing interesting here, just copying MPD settings
[module/mpd-local] [module/mpd-local]
type = internal/mpd inherit = mpd-shared
host = localhost host = localhost
port = 6600 port = 6600
format-online = ${mpd-shared.format-online}
icon-prev = ${mpd-shared.icon-prev}
icon-prev-foreground = ${mpd-shared.icon-prev-foreground}
icon-stop = ${mpd-shared.icon-stop}
icon-stop-foreground = ${mpd-shared.icon-stop-foreground}
icon-play = ${mpd-shared.icon-play}
icon-play-foreground = ${mpd-shared.icon-play-foreground}
icon-pause = ${mpd-shared.icon-pause}
icon-pause-foreground = ${mpd-shared.icon-pause-foreground}
icon-next = ${mpd-shared.icon-next}
icon-next-foreground = ${mpd-shared.icon-next-foreground}
label-song = ${mpd-shared.label-song}
label-song-foreground = ${mpd-shared.label-song-foreground}
label-song-maxlen = ${mpd-shared.label-song-maxlen}
label-song-ellipsis = ${mpd-shared.label-song-ellipsis}
bar-progress-width = ${mpd-shared.bar-progress-width}
bar-progress-indicator = ${mpd-shared.bar-progress-indicator}
bar-progress-fill = ${mpd-shared.bar-progress-fill}
bar-progress-empty = ${mpd-shared.bar-progress-empty}
[module/mpd-online-1] [module/mpd-online-1]
type = internal/mpd inherit = mpd-shared
host = ${env:MPD_ONLINE_1_HOST} host = ${env:MPD_ONLINE_1_HOST}
port = ${env:MPD_ONLINE_1_PORT} port = ${env:MPD_ONLINE_1_PORT}
password = ${env:MPD_ONLINE_1_PASS} password = ${env:MPD_ONLINE_1_PASS}
format-online = ${mpd-shared.format-online}
icon-prev = ${mpd-shared.icon-prev}
icon-prev-foreground = ${mpd-shared.icon-prev-foreground}
icon-stop = ${mpd-shared.icon-stop}
icon-stop-foreground = ${mpd-shared.icon-stop-foreground}
icon-play = ${mpd-shared.icon-play}
icon-play-foreground = ${mpd-shared.icon-play-foreground}
icon-pause = ${mpd-shared.icon-pause}
icon-pause-foreground = ${mpd-shared.icon-pause-foreground}
icon-next = ${mpd-shared.icon-next}
icon-next-foreground = ${mpd-shared.icon-next-foreground}
label-song = ${mpd-shared.label-song}
label-song-foreground = ${mpd-shared.label-song-foreground}
label-song-maxlen = ${mpd-shared.label-song-maxlen}
label-song-ellipsis = ${mpd-shared.label-song-ellipsis}
bar-progress-width = ${mpd-shared.bar-progress-width}
bar-progress-indicator = ${mpd-shared.bar-progress-indicator}
bar-progress-fill = ${mpd-shared.bar-progress-fill}
bar-progress-empty = ${mpd-shared.bar-progress-empty}
[module/mpd-online-2] [module/mpd-online-2]
type = internal/mpd inherit = mpd-shared
host = ${env:MPD_ONLINE_2_HOST} host = ${env:MPD_ONLINE_2_HOST}
port = ${env:MPD_ONLINE_2_PORT} port = ${env:MPD_ONLINE_2_PORT}
password = ${env:MPD_ONLINE_2_PASS} password = ${env:MPD_ONLINE_2_PASS}
format-online = ${mpd-shared.format-online} label-song-maxlen = ${mpd-shared.small-label-song-maxlen}
label-song-foreground = ${colors.foreground-alt}
icon-prev = ${mpd-shared.icon-prev} bar-progress-width = ${mpd-shared.small-bar-progress-width}
icon-prev-foreground = ${mpd-shared.icon-prev-foreground}
icon-stop = ${mpd-shared.icon-stop}
icon-stop-foreground = ${mpd-shared.icon-stop-foreground}
icon-play = ${mpd-shared.icon-play}
icon-play-foreground = ${mpd-shared.icon-play-foreground}
icon-pause = ${mpd-shared.icon-pause}
icon-pause-foreground = ${mpd-shared.icon-pause-foreground}
icon-next = ${mpd-shared.icon-next}
icon-next-foreground = ${mpd-shared.icon-next-foreground}
label-song = ${mpd-shared.label-song}
label-song-foreground = ${mpd-shared.label-song-foreground}
label-song-maxlen = ${mpd-shared.label-song-maxlen}
label-song-ellipsis = ${mpd-shared.label-song-ellipsis}
bar-progress-width = ${mpd-shared.bar-progress-width}
bar-progress-indicator = ${mpd-shared.bar-progress-indicator}
bar-progress-fill = ${mpd-shared.bar-progress-fill}
bar-progress-empty = ${mpd-shared.bar-progress-empty}
; }}}
[module/xbacklight] [module/xbacklight]
type = internal/xbacklight type = internal/xbacklight