main
Alpha Chen 5 months ago
parent ed90578843
commit d5e30d200d
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
PERCENTAGE="$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)" PERCENTAGE="$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)"
CHARGING="$(pmset -g batt | grep 'AC Power')" CHARGING="$(pmset -g batt | grep 'AC Power')"
@ -23,6 +23,9 @@ if [[ "$CHARGING" != "" ]]; then
ICON=􀢋 ICON=􀢋
fi fi
# The item invoking this script (name $NAME) will get its icon and label
# updated with the current battery status
sketchybar --set "$NAME" icon="$ICON" label="$PERCENTAGE%" sketchybar --set "$NAME" icon="$ICON" label="$PERCENTAGE%"
# TDOO Move into the above sketchybar command
if (( PERCENTAGE < 20 )); then
sketchybar --set label.drawing=on
fi

@ -65,6 +65,7 @@ sketchybar --add item front_app left \
# https://felixkratz.github.io/SketchyBar/config/events # https://felixkratz.github.io/SketchyBar/config/events
sketchybar --add item datetime right \ sketchybar --add item datetime right \
--subscribe datetime system_woke \
--set datetime update_freq=30 icon=􀉉 script="$PLUGIN_DIR/datetime.sh" \ --set datetime update_freq=30 icon=􀉉 script="$PLUGIN_DIR/datetime.sh" \
--add item wifi right \ --add item wifi right \
--subscribe wifi wifi_change \ --subscribe wifi wifi_change \

Loading…
Cancel
Save