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)"
CONNECTING="Tunnel status: Connecting"
CONNECTED="Tunnel status: Connected"
DISCONNECTED="Tunnel status: Disconnected"
CONNECTING="Connecting"
CONNECTED="Connected"
DISCONNECTED="Disconnected"
check_status() {
STRING="$1"
@ -22,13 +22,13 @@ TOOLTIP="$STATUS"
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"
CLASS=""
TEXT="VPN 🔒"
elif check_status "$DISCONNECTED"; then
ON_CLICK="mullvad connect"
CLASS="disconnected"
elif check_status "$CONNECTING"; then
ON_CLICK="mullvad disconnect"
CLASS="connecting"