Fix volume interval waybar

This commit is contained in:
Torjus Håkestad 2024-07-05 12:16:07 +02:00
parent 54c3e35c55
commit d331ae4e92

View File

@ -156,7 +156,11 @@ in
} }
''; '';
settings = [ settings = [
({ (
let
volInterval = if (osConfig.system.name == "gunter") then "5" else "1";
in
{
"layer" = "top"; "layer" = "top";
"position" = "top"; "position" = "top";
modules-left = [ "custom/flakestat" ]; modules-left = [ "custom/flakestat" ];
@ -183,6 +187,8 @@ in
"format" = "{icon} {volume}%"; "format" = "{icon} {volume}%";
"format-muted" = ""; "format-muted" = "";
"format-icons" = { "default" = [ "" "" "" ]; }; "format-icons" = { "default" = [ "" "" "" ]; };
"on-scroll-up" = "pamixer -i ${volInterval}";
"on-scroll-down" = "pamixer -d ${volInterval}";
"on-click" = "pamixer -t"; "on-click" = "pamixer -t";
}; };
"pulseaudio#microphone" = { "pulseaudio#microphone" = {
@ -190,8 +196,8 @@ in
"format-source" = " {volume}%"; "format-source" = " {volume}%";
"format-source-muted" = ""; "format-source-muted" = "";
"on-click" = "pamixer --default-source -t"; "on-click" = "pamixer --default-source -t";
"on-scroll-up" = "pamixer --default-source -i 5"; "on-scroll-up" = "pamixer --default-source -i ${volInterval}";
"on-scroll-down" = "pamixer --default-source -d 5"; "on-scroll-down" = "pamixer --default-source -d ${volInterval}";
"scroll-step" = 5; "scroll-step" = 5;
"on-click-right" = "pavucontrol"; "on-click-right" = "pavucontrol";
}; };
@ -240,7 +246,8 @@ in
"return-type" = "json"; "return-type" = "json";
"interval" = 600; "interval" = 600;
}; };
}) }
)
]; ];
}; };
} }