chezmoi: macOS

This commit is contained in:
whoami 2025-09-27 16:00:34 +01:00
parent fff9275372
commit c1a63e4658
39 changed files with 10 additions and 284 deletions

View file

@ -1,30 +0,0 @@
#!/usr/bin/env bash
PERCENTAGE=$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)
CHARGING=$(pmset -g batt | grep 'AC Power')
if [ "$PERCENTAGE" = "" ]; then
exit 0
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="" ;;
esac
if [ "$CHARGING" != "" ]; then
ICON=""
fi
sketchybar --set "$NAME" icon="$ICON" label="${PERCENTAGE}% "