1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-18 09:57:46 +01:00

8 lines
295 B
Bash
Executable File

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