worf: Update yabay/sketchybar/alacritty config

This commit is contained in:
2025-02-18 21:41:32 +01:00
parent da2ca7f42e
commit 47db333feb
31 changed files with 1612 additions and 15 deletions

View File

@@ -0,0 +1,28 @@
#!/bin/bash
update() {
source "$CONFIG_DIR/icons.sh"
INFO="$(/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | awk -F ' SSID: ' '/ SSID: / {print $2}')"
LABEL="$INFO ($(ipconfig getifaddr en0))"
ICON="$([ -n "$INFO" ] && echo "$WIFI_CONNECTED" || echo "$WIFI_DISCONNECTED")"
sketchybar --set $NAME icon="$ICON" label="$LABEL"
}
click() {
CURRENT_WIDTH="$(sketchybar --query $NAME | jq -r .label.width)"
WIDTH=0
if [ "$CURRENT_WIDTH" -eq "0" ]; then
WIDTH=dynamic
fi
sketchybar --animate sin 20 --set $NAME label.width="$WIDTH"
}
case "$SENDER" in
"wifi_change") update
;;
"mouse.clicked") click
;;
esac