polybar:vpn: Parse mullvad status

This commit is contained in:
2023-02-13 16:39:04 +01:00
parent 25243e5ee6
commit b489fdbe4b

View File

@@ -2,6 +2,9 @@
connection="$(nmcli con show --active | awk '$3 ~ /^(vpn|tun|wireguard)$/ { print $1 }')"
if [ -n "$connection" ]; then
if [ "$connection" = "wg-mullvad" ]; then
connection="$(mullvad status | awk '{ print $3}')"
fi
echo "VPN: $connection"
exit 0
fi