main
Alpha Chen 3 months ago
parent fe7763914e
commit 36544f8606
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -8,21 +8,21 @@ if [ "$PERCENTAGE" = "" ]; then
fi fi
case "${PERCENTAGE}" in case "${PERCENTAGE}" in
9[0-9]|100) ICON="" 9[0-9]|100) ICON=􀛨
;; ;;
[6-8][0-9]) ICON="" [6-8][0-9]) ICON=􀺸
;; ;;
[3-5][0-9]) ICON="" [3-5][0-9]) ICON=􀺶
;; ;;
[1-2][0-9]) ICON="" [1-2][0-9]) ICON=􀛩
;; ;;
*) ICON="" *) ICON=􀛪
esac esac
if [[ "$CHARGING" != "" ]]; then if [[ "$CHARGING" != "" ]]; then
ICON="" ICON=􀢋
fi fi
# The item invoking this script (name $NAME) will get its icon and label # The item invoking this script (name $NAME) will get its icon and label
# updated with the current battery status # updated with the current battery status
sketchybar --set "$NAME" icon="$ICON" label="${PERCENTAGE}%" sketchybar --set "$NAME" icon="$ICON" label="$PERCENTAGE%"

@ -1,8 +0,0 @@
#!/bin/sh
# The $NAME variable is passed from sketchybar and holds the name of
# the item invoking this script:
# https://felixkratz.github.io/SketchyBar/config/events#events-and-scripting
sketchybar --set "$NAME" label="$(date '+%d/%m %H:%M')"

@ -1,7 +0,0 @@
#!/bin/sh
# The $SELECTED variable is available for space components and indicates if
# the space invoking this script (with name: $NAME) is currently selected:
# https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item
sketchybar --set "$NAME" background.drawing="$SELECTED"

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

@ -26,26 +26,26 @@ default=(
label.font="SauceCodePro Nerd Font:Regular:14.0" label.font="SauceCodePro Nerd Font:Regular:14.0"
icon.color=0xffffffff icon.color=0xffffffff
label.color=0xffffffff label.color=0xffffffff
icon.padding_left=4 icon.padding_left=3
icon.padding_right=4 icon.padding_right=3
label.padding_left=4 label.padding_left=3
label.padding_right=4 label.padding_right=3
) )
sketchybar --default "${default[@]}" sketchybar --default "${default[@]}"
### Aerospace ### Aerospace
sketchybar --add event aerospace_workspace_change sketchybar --add event aerospace_workspace_change
sketchybar --add item focused_workspace left \ sketchybar --add item aerospace left \
--subscribe focused_workspace aerospace_workspace_change \ --subscribe aerospace aerospace_workspace_change \
--set focused_workspace \ --set aerospace \
background.color=0x44ffffff \ background.color=0x44ffffff \
background.corner_radius=5 \ background.corner_radius=5 \
background.height=20 \ background.height=20 \
background.drawing=off \ background.drawing=off \
icon.drawing=off \ icon.drawing=off \
label="$(aerospace list-workspaces --focused)" \ label="$(aerospace list-workspaces --focused)" \
script="$CONFIG_DIR/plugins/aerospace.sh" script="$CONFIG_DIR/plugins/aerospace.sh"
##### Adding Left Items ##### ##### Adding Left Items #####
# We add some regular items to the left side of the bar, where # We add some regular items to the left side of the bar, where
@ -71,15 +71,22 @@ sketchybar --add item datetime right \
--add item wifi right \ --add item wifi right \
--subscribe wifi wifi_change \ --subscribe wifi wifi_change \
--set wifi \ --set wifi \
label.drawing=off \ label.drawing=off \
update_freq=30 \ update_freq=30 \
script="$PLUGIN_DIR/network.sh" \ script="$PLUGIN_DIR/wifi.sh" \
--add item volume right \ --add item volume right \
--set volume script="$PLUGIN_DIR/volume.sh" \ --set volume \
label.drawing=off \
click_script="sketchybar -m --set \$NAME label.drawing=toggle" \
script="$PLUGIN_DIR/volume.sh" \
--subscribe volume volume_change \ --subscribe volume volume_change \
--add item battery right \ --add item battery right \
--set battery update_freq=120 script="$PLUGIN_DIR/battery.sh" \ --set battery \
--subscribe battery system_woke power_source_change \ label.drawing=off \
update_freq=120 \
click_script="sketchybar -m --set \$NAME label.drawing=toggle" \
script="$PLUGIN_DIR/battery.sh" \
--subscribe battery system_woke power_source_change
##### Force all scripts to run the first time (never do this in a script) ##### ##### Force all scripts to run the first time (never do this in a script) #####
sketchybar --update sketchybar --update

Loading…
Cancel
Save