dots/configs/home/config/polybar/old/scripts/vpn-status.sh

9 lines
199 B
Bash
Raw Normal View History

2022-04-03 01:11:04 +02:00
#!/bin/sh
vpn="$(nmcli -t -f name,type connection show --order name --active 2>/dev/null | grep vpn | head -1 | cut -d ':' -f 1)"
if [ -n "$vpn" ]; then
echo "VPN: $vpn"
else
echo "VPN: Down "
fi