From f4ec03f558b341d70fb611b503308b1af64889d6 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Mon, 26 Apr 2021 17:30:04 +0200 Subject: [PATCH] Rework polybar pulseaudio module --- .config/polybar/user_modules.ini | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.config/polybar/user_modules.ini b/.config/polybar/user_modules.ini index c036764..a797a26 100644 --- a/.config/polybar/user_modules.ini +++ b/.config/polybar/user_modules.ini @@ -292,6 +292,21 @@ interval = 0.5 format-prefix = "來 " format-prefix-foreground = ${color.green} +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +; [module/pulseaudio-control] +; +; type = custom/script +; tail = true +; label = %output% +; label-foreground = ${color.white} +; +; # 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 ;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ @@ -299,15 +314,16 @@ format-prefix-foreground = ${color.green} type = custom/script tail = true -label = %output% +label-foreground = ${color.white} -exec = ~/.config/polybar/scripts/pulseaudio-control.bash listen +exec = pulseaudio-control --icons-volume " , " --icon-muted " " --sink-nicknames-from "device.description" --sink-nickname "bluez_sink.E8_07_BF_DC_F3_6F.a2dp_sink: Aukey earpods" --sink-nickname "alsa_output.pci-000_00_1f.3.analog-stereo:蓼 Speakers" 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-foreground = ${color.green} +click-left = pulseaudio-control togmute +click-middle = pulseaudio-control next-sink +scroll-up = pulseaudio-control up +scroll-down = pulseaudio-control down + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ [module/pulse-volume]