From a45398ca71567b36ef30b6082cd39c8ed41e341b Mon Sep 17 00:00:00 2001 From: "tanguy@aristotle" Date: Fri, 24 Jul 2020 20:49:57 +0200 Subject: [PATCH] Add pulseaudio custom module --- .config/polybar/config-top.ini | 2 +- .config/polybar/user_modules.ini | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.config/polybar/config-top.ini b/.config/polybar/config-top.ini index d94c113..abe7a7d 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 = window_switch keyboard battery alsa checknetwork sysmenu +modules-right = keyboard backlight battery pulseaudio-control 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 92a4c1a..7e1a375 100644 --- a/.config/polybar/user_modules.ini +++ b/.config/polybar/user_modules.ini @@ -291,6 +291,22 @@ exec = ~/.config/polybar/scripts/system-nvidia-smi.sh interval = 0.5 format-prefix =  +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/pulseaudio-control] + +type = custom/script +tail = true +label = %output% + +exec = ~/.config/polybar/scripts/pulseaudio-control.bash listen +click-right = exec pavucontrol & +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} ;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ ;; __________ ______ ;; / ____/ __ \/ ____/