Files
shell-scripts/toggle-speaker-mute
2026-01-25 00:39:54 +01:00

10 lines
253 B
Bash
Executable File

#!/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