mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-10-09 19:11:15 +02:00
local: changed and updated scripts
This commit is contained in:
7
.local/bin/tools/vpn_menu
Executable file
7
.local/bin/tools/vpn_menu
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
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
|
Reference in New Issue
Block a user