From 57336630d35f04ebcf1ba838fd5de850742eb9f5 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 2 Dec 2019 22:14:26 +0100 Subject: [PATCH] Add mpris and volume modules to polybar --- .config/polybar/config | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.config/polybar/config b/.config/polybar/config index 8d14110..2d810fc 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -56,8 +56,8 @@ padding-right = 0 module-margin-left = 2 modules-left = workspaces -modules-center = -modules-right = networkspeed archupdates cpu temp date +modules-center = mprisdisplay +modules-right = networkspeed archupdates cpu temp date volume ; do not use offsets for the bar, would only work with override-redirect ; and will mess up tray https://github.com/polybar/polybar/issues/1355 tray-position = right @@ -221,4 +221,32 @@ type = custom/script exec = $XDG_CONFIG_HOME/polybar/scripts/poly-networkspeed tail = true +[module/mprisdisplay] +type = custom/script +exec = $XDG_CONFIG_HOME/polybar/scripts/poly-mprisdisplay +interval = 3 +click-left = playerctl play-pause & +; TODO: add album art display (on click?) - retrieved by playerctl metadata mpris:artUrl + +[module/volume] +type = internal/pulseaudio +; Available tags: +; (default) +; +; +format-volume = + +; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false +use-ui-max = false + +label-muted = ﱝ +label-muted-foreground = ${colors.foreground-alt} + +; Only applies if is used +ramp-volume-0 =  +ramp-volume-1 =  +ramp-volume-2 =  +ramp-volume-3 = 墳 + + ; vim:ft=dosini