#!/usr/bin/env bash # This script updates the microphone custom module of my specific polybar setup case "$XDG_CURRENT_DESKTOP" in "sway"|"Hyprland") "$(dirname "$0")/microphone_bar.sh" mute kill -n36 $(pgrep waybar) ;; "i3") polybar-msg -p "$(xdotool search --name polybar-default getwindowpid)" action "#microphone.hook.0" polybar-msg -p "$(xdotool search --name polybar-secondary getwindowpid)" action "#microphone.hook.1" ;; *) dunstify -u low -t 2000 -i ~/.icons/candy-icons/apps/scalable/pavucontrol.svg "Current desktop is not supported by microphone.sh" exit ;; esac