summaryrefslogtreecommitdiff
path: root/mac/.config/sketchybar/plugins/volume.sh
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-23 12:42:37 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-23 12:42:37 +0900
commit07d294425a98ee5d1e22d03e2b24ae2c76e487c0 (patch)
treea6818f0d64438c5fdb88b00a35d944f80c056213 /mac/.config/sketchybar/plugins/volume.sh
parent6fc28cdb3529ca8ee864cb5c41674cb0a4af72a1 (diff)
updates
Diffstat (limited to 'mac/.config/sketchybar/plugins/volume.sh')
-rw-r--r--mac/.config/sketchybar/plugins/volume.sh43
1 files changed, 0 insertions, 43 deletions
diff --git a/mac/.config/sketchybar/plugins/volume.sh b/mac/.config/sketchybar/plugins/volume.sh
deleted file mode 100644
index a03a790..0000000
--- a/mac/.config/sketchybar/plugins/volume.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-WIDTH=100
-
-volume_change() {
- source "$CONFIG_DIR/icons.sh"
- source "$CONFIG_DIR/colors.sh"
-
- case $INFO in
- [6-9][0-9]|100) ICON=$VOLUME_100
- ;;
- [3-5][0-9]) ICON=$VOLUME_66
- ;;
- [1-2][0-9]) ICON=$VOLUME_33
- ;;
- [1-9]) ICON=$VOLUME_10
- ;;
- 0) ICON=$VOLUME_0
- ;;
- *) ICON=$VOLUME_100
- esac
-
- sketchybar --set volume_icon icon=$ICON
- sketchybar --set $NAME slider.percentage=$INFO --animate tanh 30 --set $NAME slider.width=$WIDTH
- sleep 2
-
- # Check wether the volume was changed another time while sleeping
- FINAL_PERCENTAGE=$(sketchybar --query $NAME | jq -r ".slider.percentage")
- if [ "$FINAL_PERCENTAGE" -eq "$INFO" ]; then
- sketchybar --animate tanh 30 --set $NAME slider.width=0
- fi
-}
-
-mouse_clicked() {
- osascript -e "set volume output volume $PERCENTAGE"
-}
-
-case "$SENDER" in
- "volume_change") volume_change
- ;;
- "mouse.clicked") mouse_clicked
- ;;
-esac \ No newline at end of file