Browse Source

adding vpnmenu

master
TiynGER 8 months ago
parent
commit
19a24f46dc
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      .local/bin/etc/vpnmenu

+ 7
- 0
.local/bin/etc/vpnmenu

@ -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

Loading…
Cancel
Save