Is this possible? I want to have one Shortcut which works like a On/Off button for a VPN (similar to a wireless on/off Button on many laptops). To achieve this, I would probably need a script involving the network manager?
Reason: I have to connect and disconnect my VPN a lot. Every of these connects or disconnects takes three clicks, which adds up, plus my mouse is very insensitive (even in the most sensitive setting)
I have LM 18.1 Mate, with 4.8 Kernel.
bash -c 'if [[ -n $(nmcli con show connection-name | grep "VPN connected") ]]; then nmcli con down connection-name; else nmcli con up connection-name; fi'. – Robert Taylor May 31 '17 at 07:20