From 82e3ba3d838aaaeeea7504455881652466f8527c Mon Sep 17 00:00:00 2001 From: lorenzhohermuth Date: Sun, 4 Aug 2024 15:11:58 +0200 Subject: [PATCH] added powermenu and fixed pulse audio with another package --- .config/polybar/config.ini | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini index c7286ca..1a5e3a5 100644 --- a/.config/polybar/config.ini +++ b/.config/polybar/config.ini @@ -50,7 +50,7 @@ separator-foreground = ${colors.disabled} font-0 = "Iosevka Nerd Font:size=10;2" modules-left = xworkspaces xwindow -modules-right = pulseaudio memory cpu battery wlan date powermenu +modules-right = pulseaudio-control-output pulseaudio-control-input memory cpu battery wlan date powermenu cursor-click = pointer cursor-scroll = ns-resize @@ -105,7 +105,6 @@ label-unmounted-foreground = ${colors.disabled} [module/pulseaudio] type = internal/pulseaudio -sink = lsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Speaker__sink use-ui-max = false format-volume-prefix = "󰕾 Vol " @@ -207,7 +206,6 @@ format-background = ${colors.background} label-open = " " -;label-open-font = 4 label-close = " " label-close-foreground = ${colors.alert} label-separator = " / " @@ -225,3 +223,26 @@ menu-0-0-exec = systemctl poweroff ; lock menu-0-2 = "󰒲 " menu-0-2-exec = "bash ~/.config/i3/lockscreen.sh && systemctl suspend" + +[module/pulseaudio-control-output] +type = custom/script +tail = true +label-foreground = ${colors.foreground} + +exec = pulseaudio-control --icons-volume "󰕾" --icon-muted "󰖁 " --node-nicknames-from "device.description" --node-nickname "alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__Speaker__sink:Laptop Speakers" listen +click-right = exec pavucontrol & +click-left = pulseaudio-control togmute +scroll-up = pulseaudio-control --volume-max 130 up +scroll-down = pulseaudio-control --volume-max 130 down + +[module/pulseaudio-control-input] +type = custom/script +tail = true +label-foreground = ${colors.foreground} + +# Use --node-blacklist to remove the unwanted PulseAudio .monitor that are child of sinks +exec = pulseaudio-control --node-type input --icons-volume "󰍬" --icon-muted "󰍭" --node-nickname "alsa_output.pci-0000_0c_00.3.analog-stereo: Webcam" --node-nickname "alsa_output.usb-Kingston_HyperX_Virtual_Surround_Sound_00000000-00.analog-stereo: Headphones" --node-blacklist "*.monitor" listen +click-right = exec pavucontrol & +click-left = pulseaudio-control --node-type input togmute +scroll-up = pulseaudio-control --node-type input --volume-max 130 up +scroll-down = pulseaudio-control --node-type input --volume-max 130 down