def _start_loop(self):
        """Starts main event handler loop, run in handler thread t."""
        # Create our main loop, get our bus, and add the signal handler
        loop = DBusGMainLoop(set_as_default=True)
        dbus.set_default_main_loop(loop)

        bus = dbus.SystemBus()
        bus.add_signal_receiver(self._vpn_signal_handler, path="/org/freedesktop/NetworkManager")
        # Initialize the already active connections
        manager = bus.get_object(
            "org.freedesktop.NetworkManager",
            "/org/freedesktop/NetworkManager",
        )
        interface = dbus.Interface(manager, "org.freedesktop.DBus.Properties")
        self.active = interface.Get("org.freedesktop.NetworkManager", "ActiveConnections")

        # Loop forever to listen for events
        loop = GLib.MainLoop()
        loop.run()
Starts main event handler loop, run in handler thread t.
py3status/modules/vpn_status.py