Exemplo n.º 1
0
class FreedesktopManager(WindowManager):
    
    def start(self, callback):
        self.monitor = XServerMonitor(callback)
        self.monitor.start()
    
    def stop(self): 
        self.monitor.cancel()

    def is_supported():
        session = os.environ['DESKTOP_SESSION']
        return (session == 'gnome' or  session == 'kde')

    def is_desktop_active():
        data = execute(DESKTOP_CMD)
        return "false" in data

    is_desktop_active = staticmethod(is_desktop_active)
    is_supported = staticmethod(is_supported)
Exemplo n.º 2
0
 def start(self, callback):
     self.monitor = XServerMonitor(callback)
     self.monitor.start()