added a speaker mute script

This commit is contained in:
2026-01-25 00:39:54 +01:00
parent 6dc8fe7152
commit 4aa90cf50a

9
toggle-speaker-mute Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
is_mic_muted=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep "[MUTED]" | wc -l)
if [ "$is_mic_muted" -eq "1" ]; then
echo "Is now speaker muted"
else
echo "Isn't speaker muted anymore"
fi