Add wicked MPD setup to Polybar
This commit is contained in:
parent
09f073e0de
commit
a188b0e930
3 changed files with 100 additions and 15 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
nvim/plug
|
||||
nvim/**/.*
|
||||
**/secrets.sh
|
||||
|
|
|
@ -62,9 +62,9 @@ font-7 = "Material Wifi Signal strength:pixelsize=14;2"
|
|||
;font-1 = "Roboto:size=11:weight=bold;2"
|
||||
;font-2 = "Noto Sans:size=11;1"
|
||||
|
||||
modules-left = i3
|
||||
modules-left = i3 mpd-local mpd-online-1
|
||||
modules-center = date
|
||||
modules-right = mpd volume battery cpu memory temperature eth wlan
|
||||
modules-right = volume battery cpu memory temperature eth wlan
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 2
|
||||
|
@ -169,24 +169,102 @@ label-urgent = %index%
|
|||
label-urgent-background = ${module/bspwm.label-urgent-background}
|
||||
label-urgent-padding = ${module/bspwm.label-urgent-padding}
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
[mpd-shared]
|
||||
format-online = <toggle> <icon-prev> <label-song> <icon-next>
|
||||
|
||||
;icon-prev =
|
||||
;icon-stop =
|
||||
;icon-play =
|
||||
;icon-prev =
|
||||
;icon-stop =
|
||||
;icon-play =
|
||||
;icon-pause =
|
||||
;icon-next =
|
||||
icon-prev =
|
||||
icon-stop =
|
||||
icon-play =
|
||||
;icon-next =
|
||||
icon-prev =
|
||||
icon-stop =
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-next =
|
||||
icon-next =
|
||||
|
||||
label-song-maxlen = 25
|
||||
label-song = %artist% - %title%
|
||||
label-song-maxlen = 25
|
||||
label-song-ellipsis = true
|
||||
|
||||
bar-progress-width = 45
|
||||
bar-progress-indicator = |
|
||||
bar-progress-fill = ─
|
||||
bar-progress-empty = ─
|
||||
|
||||
; {{{ nothing interesting here, just copying MPD settings
|
||||
[module/mpd-local]
|
||||
type = internal/mpd
|
||||
|
||||
host = localhost
|
||||
port = 6600
|
||||
|
||||
format-online = ${mpd-shared.format-online}
|
||||
|
||||
icon-prev = ${mpd-shared.icon-prev}
|
||||
icon-stop = ${mpd-shared.icon-stop}
|
||||
icon-play = ${mpd-shared.icon-play}
|
||||
icon-pause = ${mpd-shared.icon-pause}
|
||||
icon-next = ${mpd-shared.icon-next}
|
||||
|
||||
label-song = ${mpd-shared.label-song}
|
||||
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]
|
||||
type = internal/mpd
|
||||
|
||||
host = ${env:MPD_ONLINE_1_HOST}
|
||||
port = ${env:MPD_ONLINE_1_PORT}
|
||||
password = ${env:MPD_ONLINE_1_PASS}
|
||||
|
||||
format-online = ${mpd-shared.format-online}
|
||||
|
||||
icon-prev = ${mpd-shared.icon-prev}
|
||||
icon-stop = ${mpd-shared.icon-stop}
|
||||
icon-play = ${mpd-shared.icon-play}
|
||||
icon-pause = ${mpd-shared.icon-pause}
|
||||
icon-next = ${mpd-shared.icon-next}
|
||||
|
||||
label-song = ${mpd-shared.label-song}
|
||||
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]
|
||||
type = internal/mpd
|
||||
|
||||
host = ${env:MPD_ONLINE_2_HOST}
|
||||
port = ${env:MPD_ONLINE_2_PORT}
|
||||
password = ${env:MPD_ONLINE_2_PASS}
|
||||
|
||||
format-online = ${mpd-shared.format-online}
|
||||
|
||||
icon-prev = ${mpd-shared.icon-prev}
|
||||
icon-stop = ${mpd-shared.icon-stop}
|
||||
icon-play = ${mpd-shared.icon-play}
|
||||
icon-pause = ${mpd-shared.icon-pause}
|
||||
icon-next = ${mpd-shared.icon-next}
|
||||
|
||||
label-song = ${mpd-shared.label-song}
|
||||
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]
|
||||
type = internal/xbacklight
|
||||
|
||||
|
@ -460,4 +538,4 @@ screenchange-reload = true
|
|||
margin-top = 5
|
||||
margin-bottom = 5
|
||||
|
||||
; vim:ft=dosini
|
||||
; vim: set ft=dosini foldmethod=marker foldlevel=0 :
|
||||
|
|
|
@ -8,6 +8,12 @@ killall -q polybar
|
|||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
polybar --config="$HOME/.config/polybar/config.ini" midbard &
|
||||
(
|
||||
set -o allexport # Make all assignments exports
|
||||
source "$(dirname "$0")"/secrets.sh
|
||||
set +o allexport
|
||||
|
||||
polybar --config="$HOME/.config/polybar/config.ini" midbard &
|
||||
)
|
||||
|
||||
echo "Polybar launched."
|
||||
|
|
Loading…
Reference in a new issue