Refactor Hyprland configs, introduce Sithego for theming, and add supporting scripts
This commit is contained in:
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
msgTag="volume"
|
||||
TIME=1000
|
||||
|
||||
case "$1" in
|
||||
up)
|
||||
wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
|
||||
;;
|
||||
down)
|
||||
wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-
|
||||
;;
|
||||
mute)
|
||||
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
mute=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q MUTED && echo "yes" || echo "no")
|
||||
if [[ "$mute" == "yes" ]]; then
|
||||
dunstify -t $TIME \
|
||||
-a "Volume" \
|
||||
-h string:x-dunst-stack-tag:$msgTag \
|
||||
"Muted"
|
||||
else
|
||||
dunstify -t $TIME \
|
||||
-a "Volume" \
|
||||
-h string:x-dunst-stack-tag:$msgTag \
|
||||
"Unmuted"
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [up/down/mute/mic]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
volume=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2*100)}')
|
||||
mute=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q MUTED && echo "yes" || echo "no")
|
||||
|
||||
if [[ "$mute" != "yes" ]]; then
|
||||
dunstify -t $TIME \
|
||||
-a "Volume" \
|
||||
-h string:x-dunst-stack-tag:$msgTag \
|
||||
-h int:value:"$volume" \
|
||||
"Volume: $volume%"
|
||||
fi
|
||||
Reference in New Issue
Block a user