Fix mullvad-waybar
This commit is contained in:
@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user