Fix mullvad-waybar

This commit is contained in:
2022-07-15 09:38:53 +02:00
parent e4e0bff904
commit 00f1a77c51

View File

@ -8,9 +8,9 @@ fi
STATUS="$(mullvad status)" STATUS="$(mullvad status)"
CONNECTING="Tunnel status: Connecting" CONNECTING="Connecting"
CONNECTED="Tunnel status: Connected" CONNECTED="Connected"
DISCONNECTED="Tunnel status: Disconnected" DISCONNECTED="Disconnected"
check_status() { check_status() {
STRING="$1" STRING="$1"
@ -22,13 +22,13 @@ TOOLTIP="$STATUS"
TEXT="VPN 🔓" TEXT="VPN 🔓"
if check_status "$CONNECTED"; then if check_status "$DISCONNECTED"; then
ON_CLICK="mullvad connect"
CLASS="disconnected"
elif check_status "$CONNECTED"; then
ON_CLICK="mullvad disconnect" ON_CLICK="mullvad disconnect"
CLASS="" CLASS=""
TEXT="VPN 🔒" TEXT="VPN 🔒"
elif check_status "$DISCONNECTED"; then
ON_CLICK="mullvad connect"
CLASS="disconnected"
elif check_status "$CONNECTING"; then elif check_status "$CONNECTING"; then
ON_CLICK="mullvad disconnect" ON_CLICK="mullvad disconnect"
CLASS="connecting" CLASS="connecting"