add old scripts

This commit is contained in:
Steve B 2025-12-05 15:46:07 -05:00
commit 9c1772908b
18 changed files with 338 additions and 0 deletions

24
util/mictoggle Executable file
View file

@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Toggle microphone mute state using pactl (PulseAudio / PipeWire)
# Requires: pactl, notify-send
# Get default source (microphone)
SRC=$(pactl info | awk -F': ' '/Default Source/ { print $2 }')
if [[ -z "$SRC" ]]; then
notify-send "🎙️ Mic Toggle" "No microphone source found."
exit 1
fi
# Get current mute state: yes/no
STATE=$(pactl get-source-mute "$SRC" | awk '{print $2}')
if [[ "$STATE" == "yes" ]]; then
pactl set-source-mute "$SRC" 0
notify-send "🎙️ Microphone" "🔊 Unmuted"
else
pactl set-source-mute "$SRC" 1
notify-send "🎙️ Microphone" "🔇 Muted"
fi