Files
nixos/scripts/WMScripts/toggle_audiocables.sh
2026-10-06 22:34:05 +02:00

39 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# This script updates the clementine and combine toggle custom modules of my specific polybar setup
case "$XDG_CURRENT_DESKTOP" in
"sway"|"Hyprland")
case "$1" in
"clementine")
"$(dirname "$0")/toggle_audiocables_bar.sh" toggle clementine
kill -37 $(pgrep waybar)
;;
"combine")
"$(dirname "$0")/toggle_audiocables_bar.sh" toggle combine
kill -37 $(pgrep waybar)
;;
*)
echo "Unknown sink specified."
;;
esac
;;
"i3")
case "$1" in
"clementine")
polybar-msg -p "$(xdotool search --name polybar-default getwindowpid)" action "#audiocables.hook.0"
;;
"combine")
polybar-msg -p "$(xdotool search --name polybar-default getwindowpid)" action "#audiocables.hook.1"
;;
*)
echo "unknown sink specified."
;;
esac
;;
*)
dunstify -u low -t 2000 -i ~/.icons/candy-icons/apps/scalable/pavucontrol.svg "Current desktop is not supported by audiocables.sh"
exit
;;
esac