Until WireGuard is integrated in the NetworkManager UI, this can be used to toggle a NetworkManager connection using the Argos Gnome Shell Extension.
"Install" the helper script:
$ cd ~/.config/argos
$ git clone git@github.com:shimikano/argos-network-manager.git
Use it for a connection MyConnection
, e.g. in a file called ~/.config/argos/MyConnection.5s.sh
:
#!/usr/bin/env bash
echo "$(~/.config/argos/argos-network-manager/argos-network-manager-helper.sh MyConnection)"
Install Argos as usual, then replace the menuitem.js
file:
cd ~/.local/share/gnome-shell/extensions/argos@pew.worldwidemann.com
wget --output-document=menuitem.js https://raw.githubusercontent.com/rammie/argos/gnome-3.36/argos%40pew.worldwidemann.com/menuitem.js
Then, hit Alt+F2 and enter r
to restart the Gnome Shell.