Files
shell-scripts/toggle-mic-mute
2026-01-25 00:42:32 +01:00

10 lines
249 B
Bash
Executable File

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