blob: de93cf64020ea3f96ee49e287f766613e9499572 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/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
|