2022-07-30 07:17:12 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# path where mullvad is kept
|
|
|
|
PATH=/usr/local/bin:$PATH
|
|
|
|
|
2022-07-31 21:31:57 +02:00
|
|
|
if ! [ -x "$(command -v mullvad)" ]; then
|
|
|
|
sketchybar --set "$NAME" icon=" " label=""
|
|
|
|
fi
|
2022-07-30 07:17:12 +02:00
|
|
|
|
2022-07-31 21:31:57 +02:00
|
|
|
while read -r LINE; do
|
|
|
|
if echo "$LINE" | grep -q 'Connected'; then
|
2022-07-30 07:17:12 +02:00
|
|
|
ICON=" "
|
|
|
|
else
|
|
|
|
ICON=" "
|
|
|
|
fi
|
|
|
|
|
2022-11-07 12:00:00 +01:00
|
|
|
sketchybar --set "$NAME" icon="$ICON"
|
2022-07-31 21:31:57 +02:00
|
|
|
done < <(mullvad status listen)
|