feat: adds sketchybar configuration

This commit is contained in:
ahwx 2026-02-21 23:19:14 +01:00
parent d8cdb130b5
commit 4b0e72ec7a
9 changed files with 226 additions and 0 deletions

View file

@ -0,0 +1,15 @@
#!/bin/bash
PERCENTAGE="$(pmset -g batt | grep -Eo "...%" | awk '{print $1}')"
CHARGING="$(pmset -g batt | grep 'AC Power')"
# The item invoking this script (name $NAME) will get its icon and label
# updated with the current battery status
if [[ "$CHARGING" != "" ]]; then
STATE="CHAR:"
else
STATE="BATT:"
fi
sketchybar --set "$NAME" label="$STATE $PERCENTAGE"