From dc1116f0ac4eade3636b085c5bb8b28dd6e9a2b9 Mon Sep 17 00:00:00 2001 From: "tanguy@aristotle" Date: Tue, 24 Nov 2020 13:11:21 +0100 Subject: [PATCH] Add pulse-volume polybar module --- .config/polybar/config-top.ini | 2 +- .config/polybar/user_modules.ini | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.config/polybar/config-top.ini b/.config/polybar/config-top.ini index f2f5316..bbc23ca 100644 --- a/.config/polybar/config-top.ini +++ b/.config/polybar/config-top.ini @@ -161,7 +161,7 @@ font-2 = "xos4 Terminus:size=12;2" modules-left = title modules-center = workspaces -modules-right = keyboard backlight battery pulseaudio-control checknetwork +modules-right = keyboard backlight battery pulseaudio-control pulse-volume checknetwork ; The separator will be inserted between the output of each module separator = diff --git a/.config/polybar/user_modules.ini b/.config/polybar/user_modules.ini index 7e1a375..45529b3 100644 --- a/.config/polybar/user_modules.ini +++ b/.config/polybar/user_modules.ini @@ -305,6 +305,18 @@ click-left = ~/.config/polybar/scripts/pulseaudio-control.bash togmute click-middle = ~/.config/polybar/scripts/pulseaudio-control.bash next-sink scroll-up = ~/.config/polybar/scripts/pulseaudio-control.bash up scroll-down = ~/.config/polybar/scripts/pulseaudio-control.bash down +label-padding = 2 +label-foreground = ${color.fg} + +[module/pulse-volume] + +type = custom/script +tail = true +label = %output% + +exec = ~/.config/polybar/scripts/volume.sh feed +click-left = ~/.config/polybar/scripts/volume.sh change_mode + label-padding = 2 label-foreground = ${color.fg} ;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_