-
-
Notifications
You must be signed in to change notification settings - Fork 149
Open
Description
A variable computed inside a SketchyBar item script updates correctly when logged, but the label does not reliably update in the bar when switching between a numeric value and a glyph.
Issue
The Variable Should Return 7 as in the label but all we get is 1
Code
#!/bin/bash
source "$HOME/.config/sketchybar/colors.sh"
BREW_COUNT=$(brew outdated | wc -l | tr -d ' ') #7
# echo "COUNT: $BREW_COUNT" > /tmp/sketchybar_debug.log
if [ "$BREW_COUNT" -ge 30 ]; then
COLOR=$RED
elif [ "$BREW_COUNT" -ge 10 ]; then
COLOR=$ORANGE
elif [ "$BREW_COUNT" -ge 1 ]; then
COLOR=$YELLOW
else
COLOR=$GREEN
BREW_COUNT=
fi
sketchybar --set "$NAME" icon.color="$COLOR" label="$BREW_COUNT"SS:

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels