sketchybar tailscale

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

@ -0,0 +1,9 @@
#!/bin/bash
if tailscale status --self; then
ICON=􀎡
else
ICON=􀎥
fi
sketchybar --set "$NAME" icon="$ICON"

@ -1,19 +1,11 @@
#!/bin/sh
# source "$HOME/.config/colors.sh" # Loads all defined colors
#!/bin/bash
IP_ADDRESS=$(scutil --nwi | grep address | sed 's/.*://' | tr -d ' ' | head -1)
if [[ $IP_ADDRESS != "" ]]; then
COLOR=$BLUE
ICON=􀙇
LABEL=
else
COLOR=$WHITE
ICON=􀙈
LABEL="Not Connected"
fi
sketchybar --set $NAME background.color=$COLOR \
icon=$ICON \
label="$LABEL"
sketchybar --set $NAME icon=$ICON

@ -73,7 +73,13 @@ sketchybar --add item datetime right \
--set wifi \
label.drawing=off \
update_freq=30 \
click_script="open x-apple.systempreferences:com.apple.wifi-settings-extension" \
script="$PLUGIN_DIR/wifi.sh" \
--add item tailscale right \
--set tailscale \
label.drawing=off \
update_freq=30 \
script="$PLUGIN_DIR/tailscale.sh" \
--add item volume right \
--set volume \
label.drawing=off \

Loading…
Cancel
Save