style: format shell scripts

This commit is contained in:
github-actions[bot] 2025-02-25 12:36:22 +00:00
parent 8c5babe80a
commit 76b5fd4118
18 changed files with 231 additions and 242 deletions

View file

@ -4,7 +4,7 @@
# chmod +x ~/.config/sketchybar/plugins/aerospace.sh
if [ "$1" = "$FOCUSED_WORKSPACE" ]; then
sketchybar --set $NAME background.drawing=on
sketchybar --set $NAME background.drawing=on
else
sketchybar --set $NAME background.drawing=off
sketchybar --set $NAME background.drawing=off
fi

View file

@ -8,15 +8,19 @@ if [ "$PERCENTAGE" = "" ]; then
fi
case "${PERCENTAGE}" in
9[0-9]|100) ICON=""
;;
[6-8][0-9]) ICON=""
;;
[3-5][0-9]) ICON=""
;;
[1-2][0-9]) ICON=""
;;
*) ICON=""
9[0-9] | 100)
ICON=""
;;
[6-8][0-9])
ICON=""
;;
[3-5][0-9])
ICON=""
;;
[1-2][0-9])
ICON=""
;;
*) ICON="" ;;
esac
if [[ "$CHARGING" != "" ]]; then

View file

@ -5,4 +5,3 @@
# https://felixkratz.github.io/SketchyBar/config/events#events-and-scripting
sketchybar --set "$NAME" label="$(date '+%d日周%u %H:%M')"

View file

@ -2,7 +2,6 @@
music_info=$(curlie GET http://localhost:10767/api/v1/playback/now-playing | jq -r '"\(.info.name) - \(.info.artistName)"')
ICON=""
sketchybar --set $NAME label="$music_info" icon="$ICON"

View file

@ -7,13 +7,16 @@ if [ "$SENDER" = "volume_change" ]; then
VOLUME="$INFO"
case "$VOLUME" in
[6-9][0-9]|100) ICON="󰕾"
;;
[3-5][0-9]) ICON="󰖀"
;;
[1-9]|[1-2][0-9]) ICON="󰕿"
;;
*) ICON="󰖁"
[6-9][0-9] | 100)
ICON="󰕾"
;;
[3-5][0-9])
ICON="󰖀"
;;
[1-9] | [1-2][0-9])
ICON="󰕿"
;;
*) ICON="󰖁" ;;
esac
sketchybar --set "$NAME" icon="$ICON" label="$VOLUME%"