1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-20 10:37:46 +01:00
2020-04-14 17:47:11 +02:00

8 lines
293 B
Bash
Executable File

#!/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