Add new bin scripts

This commit is contained in:
Gregory Eremin
2020-09-12 09:59:24 +02:00
parent 9b3ff362cf
commit 5f10a0fc70
13 changed files with 204 additions and 37 deletions
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
if [ "$(nmcli -g GENERAL.STATE con show $VPN_NAME || true)" == "activated" ]; then
choices=Disconnect
else
choices=Connect
fi
choice=$(echo -e $choices | wofi -i -d -W 400 -H 250 -p $VPN_NAME)
case $choice in
'Connect')
nmcli con up $VPN_NAME
;;
'Disconnect')
nmcli con down $VPN_NAME
esac