hyprland: Change volume before sending notification

This commit is contained in:
Donovan Glover 2024-01-29 17:17:56 -05:00
parent dd3bc13383
commit edde3c3e42
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -23,9 +23,11 @@ in
text = /* fish */ '' text = /* fish */ ''
#!/usr/bin/env fish #!/usr/bin/env fish
wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
set VOL $(math "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | choose 1) * 100") set VOL $(math "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | choose 1) * 100")
wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -t 2000 "Raised volume to" "$VOL%" notify-send -t 2000 "Raised volume to" "$VOL%"
''; '';
}; };
@ -34,9 +36,11 @@ in
text = /* fish */ '' text = /* fish */ ''
#!/usr/bin/env fish #!/usr/bin/env fish
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
set VOL $(math "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | choose 1) * 100") set VOL $(math "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | choose 1) * 100")
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -t 2000 "Lowered volume to" "$VOL%" notify-send -t 2000 "Lowered volume to" "$VOL%"
''; '';
}; };