dotfiles/.config/sketchybar/plugins/mic/mic_click.sh.old
2026-06-03 14:36:50 -04:00

18 lines
484 B
Shell
Executable file

#!/bin/bash
source "$CONFIG_DIR/colors.sh"
MIC_VOLUME=$(osascript -e 'input volume of (get volume settings)')
if [[ $MIC_VOLUME -eq 0 ]]; then
osascript -e 'set volume input volume 25'
ICON=""
COLOR=$GREEN
#sketchybar -m --set mic icon="" icon.color=$GREEN
elif [[ $MIC_VOLUME -gt 0 ]]; then
osascript -e 'set volume input volume 0'
ICON=""
COLOR=$RED
#sketchybar -m --set mic icon="" icon.color=$RED
fi
sketchybar -m --set mic icon="$ICON" icon.color=$COLOR