feat: added tick for mullvad api check
This commit is contained in:
@@ -14,7 +14,16 @@ connection_status() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
config="/home/matt/.config/waybar/configs/gb-mnc-wg-005-2.conf"
|
api_check() {
|
||||||
|
status=$(curl -s https://am.i.mullvad.net/connected)
|
||||||
|
if [[ "$status" != *"not"* ]]; then
|
||||||
|
echo "✅"
|
||||||
|
else
|
||||||
|
echo "❌"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
config="/home/matt/.config/waybar/configs/es-bcn-wg-001.conf"
|
||||||
config_name=$(basename "${config%.*}")
|
config_name=$(basename "${config%.*}")
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -26,12 +35,13 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
check=$(api_check)
|
||||||
if [ "$(connection_status)" = "1" ]; then
|
if [ "$(connection_status)" = "1" ]; then
|
||||||
echo " VPN: On "
|
echo " VPN: On API: " $check " "
|
||||||
elif [ "$(connection_status)" = "3" ]; then
|
elif [ "$(connection_status)" = "3" ]; then
|
||||||
echo " Config not found! "
|
echo " Config not found! "
|
||||||
else
|
else
|
||||||
echo " VPN: Off "
|
echo " VPN: Off " $check " "
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user