1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-27 21:47:46 +01:00

adding vpnmenu

This commit is contained in:
TiynGER 2020-04-14 17:47:11 +02:00
parent 93196b6397
commit 19a24f46dc

7
.local/bin/etc/vpnmenu Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
active=$(nmcli connection show --active | grep vpn | cut -d' ' -f1)
[[ ! -z "$active" ]] && { prompt "disconnect from $active?" || exit 1; }
[[ ! -z "$active" ]] && nmcli connection down $active
conn=$(nmcli connection | grep vpn | cut -d' ' -f1 | dmenu)
nmcli connection up $conn