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