adds initial dotfiles

This commit is contained in:
2026-05-15 14:13:12 +02:00
parent 5e88941adf
commit dc0bfb0d23
135 changed files with 81606 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
#!/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
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 \
"muted"
else
dunstify -t $TIME \
-a "Volume" \
-h string:x-dunst-stack-tag:$msgTag \
-h int:value:"$volume" \
"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" \
"$1"
fi