From b0c2db20ea231ad17827c4a00d27263c96e36e4d Mon Sep 17 00:00:00 2001 From: srdusr Date: Mon, 29 Jan 2024 23:56:43 +0200 Subject: Add vpn script --- .config/polybar/scripts/vpn.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 .config/polybar/scripts/vpn.sh (limited to '.config/polybar/scripts') diff --git a/.config/polybar/scripts/vpn.sh b/.config/polybar/scripts/vpn.sh new file mode 100755 index 0000000..27def8a --- /dev/null +++ b/.config/polybar/scripts/vpn.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +country=$(protonvpn s | grep Country) +connection=$(pgrep -a openvpn$ | head -n 1 | awk '{print $NF }' | cut -d '.' -f 1) + +if [ "$connection" != "" ]; then + echo " vpn" #"$country" +else + echo " vpn" +fi +# +#proton_status=$(protonvpn s) +#current_status=$(protonvpn s | wc -l) +#current_server=$(protonvpn s | awk '/Server:/ {print "VPN "$2}') +# +#if [ "$current_status" -gt 2 ]; then +# echo "$current_server" +#else +# echo "%{F#bf616a}NO VPN" +#fi -- cgit v1.2.3