bar: Re‐work audio status

This commit is contained in:
Mikael 2024-08-31 00:32:24 +02:00
parent 069f047cf5
commit bba32d43b4
Signed by: mikael
SSH key fingerprint: SHA256:21QyD2Meiot7jOUVitIR5YkGB/XuXdCvLW1hE6dsri0

View file

@ -66,7 +66,15 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
color: ${yellow}; color: ${yellow};
} }
#pulseaudio.muted { #pulseaudio.sink.muted {
color: ${base03};
}
#pulseaudio.source {
color: ${yellow};
}
#pulseaudio.source.source-muted {
color: ${base03}; color: ${base03};
} }
'') |> lib.mkForce; '') |> lib.mkForce;
@ -231,17 +239,19 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
in { in {
format = "{icon} ${fmt}"; format = "{icon} ${fmt}";
format-bluetooth = "󰂰 ${fmt}"; format-bluetooth = "󰂰 ${fmt}";
format-muted = " ${fmt}"; format-muted = "󰖁 ${fmt}";
format-icons = { format-icons = {
headphone = ""; headphone = "";
default = [ "" "" ]; default = [ "󰕿" "󰖀" "󰕾" ];
}; };
on-click = pwvucontrol; on-click = "${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle";
on-click-right = "${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"; on-click-right = pwvucontrol;
on-scroll-up = "${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%+"; on-scroll-up = "${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%+";
on-scroll-down = "${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%-"; on-scroll-down = "${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%-";
max-volume = 100;
}; };
"pulseaudio#source" = let "pulseaudio#source" = let
@ -251,8 +261,8 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) {
format-source = "󰍬 ${fmt}"; format-source = "󰍬 ${fmt}";
format-source-muted = "󰍭 ${fmt}"; format-source-muted = "󰍭 ${fmt}";
on-click = pwvucontrol; on-click = "${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
on-click-right = "${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; on-click-right = pwvucontrol;
on-scroll-up = "${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ 1%+"; on-scroll-up = "${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ 1%+";
on-scroll-down = "${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ 1%-"; on-scroll-down = "${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ 1%-";
}; };