#!/usr/bin/env bash set -euo pipefail if ! command -v pactl >/dev/null 2>&1; then exit 0 fi pactl set-source-mute @DEFAULT_SOURCE@ toggle if command -v dunstify >/dev/null 2>&1; then status="$(pactl get-source-mute @DEFAULT_SOURCE@ 2>/dev/null | awk '{ print $2 }' || true)" dunstify -a polybar -u low "Microphone" "${status:-toggled}" fi