gnome shell extension
Hi. I am working on a GNOME Shell extension to integrate Riseup VPN into GNOME's status menu. It basically functions right now (see the video below), but some of the ways in which it interacts with the VPN are hacky and wrong:
- The extension currently determines whether the VPN is on by checking whether there is a current process called "riseup-vpn" and whether "tun" appears in the output of
nmcli c show --active
. This is probably not reliable. For example, there would be a false positive if riseup-vpn were running but off while another VPN was running and connected. - The extension currently turns the VPN on and off by killing the riseup-vpn process and restarting it with the
-start-vpn on
or-start-vpn off
option which is slow (I've edited out the delay in the video) and dirty.
I've begun looking through bitmask-vpn's code to see if there is some functionality exposed that the extension could use to properly determine the VPN's status and to turn it on/off without killing and restarting it. However, I have no experience with golang and am having a hard time understanding it, so I thought I'd see if someone more familiar with the codebase could give me some insight or guidance.
Here is the code so far.
Here is a video. I have Topicons plus installed to display the systray icon alongside the status menu for demonstration purposes.
Thanks!