pinwheel: Fix status of mullvad for waybar

This commit is contained in:
Alexander Heldt
2024-05-04 17:57:59 +02:00
parent 6ae7f29f73
commit 919aa067ad

View File

@@ -42,7 +42,7 @@ let
STATUS_CONNECTED="Connected" STATUS_CONNECTED="Connected"
status() { status() {
STATUS=$(${pkgs.mullvad}/bin/mullvad status | awk '{print $1}') STATUS=$(${pkgs.mullvad}/bin/mullvad status | awk 'NR==1{print $1}')
echo $STATUS echo $STATUS
} }
@@ -53,7 +53,7 @@ let
$STATUS_CONNECTING) $STATUS_CONNECTING)
echo '{ "text": "", "tooltip": "Connecting", "class": "disconnected" }' ;; echo '{ "text": "", "tooltip": "Connecting", "class": "disconnected" }' ;;
$STATUS_CONNECTED) $STATUS_CONNECTED)
TOOLTIP=$(${pkgs.mullvad}/bin/mullvad status) TOOLTIP=$(${pkgs.mullvad}/bin/mullvad status | awk 'NR==1')
echo "{ \"text\": \"\", \"tooltip\":\"$TOOLTIP\" }" ;; echo "{ \"text\": \"\", \"tooltip\":\"$TOOLTIP\" }" ;;
$STATUS_DISCONNECTING) $STATUS_DISCONNECTING)
echo '{ "text": "", "tooltip": "Disconnecting", "class": "disconnected" }' ;; echo '{ "text": "", "tooltip": "Disconnecting", "class": "disconnected" }' ;;