dotfiles/dot_config/sketchybar/plugins/executable_mullvad.sh

19 lines
357 B
Bash
Raw Normal View History

2022-07-30 07:17:12 +02:00
#!/usr/bin/env bash
# path where mullvad is kept
PATH=/usr/local/bin:$PATH
if ! [ -x "$(command -v mullvad)" ]; then
sketchybar --set "$NAME" icon=" " label=""
fi
2022-07-30 07:17:12 +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"
done < <(mullvad status listen)