scripts reorganize

This commit is contained in:
2026-10-06 22:34:05 +02:00
parent a2a056a68d
commit 0734bee219
60 changed files with 824 additions and 5 deletions

View File

@@ -0,0 +1,41 @@
#!/usr/bin/env bash
MUTE=" "
NORMAL=""
output () {
case "$XDG_CURRENT_DESKTOP" in
"sway"|"Hyprland")
if [[ -n "$1" ]]; then
echo "{\"text\": \"$NORMAL\", \"alt\": \"\", \"tooltip\": \"\", \"class\": \"unmuted-mike\", \"percentage\": 0}"
else
echo "{\"text\": \"$MUTE\", \"alt\": \"\", \"tooltip\": \"\", \"class\": \"muted-mike\", \"percentage\": 0}"
fi
;;
"i3")
if [[ -n "$1" ]]; then
echo "$NORMAL"
else
echo "%{F#707880}$MUTE%{T- F-}"
fi
;;
*)
dunstify -t 2000 -u low -i ~/.icons/candy-icons/apps/scalable/noisetorch.svg "This desktop is not supported."
exit
;;
esac
}
if [[ "$1" == "mute" ]]; then
amixer sset Capture toggle > /dev/null
fi
STATUS=$(amixer get Capture | tail -n1 | awk '{print $5}' -)
case $STATUS in
"[on]")
output "yes"
;;
*)
output
;;
esac