Ejemplo n.º 1
0
 def wm_var_check(self):
     """
     Check the existence of window manager unique variable.
     """
     if getenv('GNOME_DESKTOP_SESSION_ID'):
         return 'gnome'
     elif getenv('KDE_FULL_SESSION'):
         return 'kde'
     elif getenv('_LXSESSION_PID'):
         return 'lxde'
     elif getoutput('pstree | grep xfwm4'):
         return 'xfce'
     elif getenv('DESKTOP') == 'Enlightenment-0.17.0' or getoutput('pstree | grep enlightenment'):
         return 'enlightenment'
     elif getoutput('pstree | grep WindowMaker') or getoutput ('pstree | grep wmaker'):
         return 'wmaker'
     elif getoutput('pstree | grep fluxbox'):
         return 'fluxbox'
     elif getoutput('pstree | grep blackbox'):
         return 'blackbox'
     elif getoutput('pstree | grep wmii'):
         return 'wmii'
     elif getoutput('pstree | grep fvwm2'):
         return 'fvwm2'
     elif getoutput('pstree | grep icewm'):
         return 'icewm'
     elif getoutput('pstree | grep twm'):
         return 'twm'
     elif getoutput('pstree | grep jwm'):
         return 'jwm'
     else:
         from lazyscripts.gui.gtklib import user_choice
         return user_choice()
Ejemplo n.º 2
0
 def wm_var_check(self):
     """
     Check the existence of window manager unique variable.
     """
     if getenv('GNOME_DESKTOP_SESSION_ID'):
         return 'gnome'
     elif getenv('KDE_FULL_SESSION'):
         return 'kde'
     elif getenv('_LXSESSION_PID'):
         return 'lxde'
     elif getoutput('pstree | grep xfwm4'):
         return 'xfce'
     elif getoutput('pstree | grep WindowMaker'):
         return 'wmaker'
     else:
         from lazyscripts.gui.gtklib import user_choice
         return user_choice()
Ejemplo n.º 3
0
 def wm_var_check(self):
     """
     Check the existence of window manager unique variable.
     """
     if getenv('GNOME_DESKTOP_SESSION_ID'):
         return 'gnome'
     elif getenv('KDE_FULL_SESSION'):
         return 'kde'
     elif getenv('_LXSESSION_PID'):
         return 'lxde'
     elif getoutput('pstree | grep xfwm4'):
         return 'xfce'
     elif getoutput('pstree | grep WindowMaker'):
         return 'wmaker'
     else:
         from lazyscripts.gui.gtklib import user_choice
         return user_choice()
Ejemplo n.º 4
0
    def wm_var_check(self):
        """
        Check the existence of window manager unique variable.
        """
        if getenv("GNOME_DESKTOP_SESSION_ID"):
            return "gnome"
        elif getenv("KDE_FULL_SESSION"):
            return "kde"
        elif getenv("_LXSESSION_PID"):
            return "lxde"
        elif getoutput("pstree | grep xfwm4"):
            return "xfce"
        elif getoutput("pstree | grep WindowMaker"):
            return "wmaker"
        else:
            from lazyscripts.gui.gtklib import user_choice

            return user_choice()
Ejemplo n.º 5
0
 def wm_var_check(self):
     """
     Check the existence of window manager unique variable.
     """
     if getenv('GNOME_DESKTOP_SESSION_ID'):
         if getenv('GDMSESSION') == 'une':
             return 'une'
         else:
             return 'gnome'
     elif getenv('KDE_FULL_SESSION'):
         return 'kde'
     elif getenv('_LXSESSION_PID'):
         return 'lxde'
     elif getoutput('pstree | grep xfwm4'):
         return 'xfce'
     elif getenv('DESKTOP') == 'Enlightenment-0.17.0' or getoutput(
             'pstree | grep enlightenment'):
         return 'enlightenment'
     elif getoutput('pstree | grep WindowMaker') or getoutput(
             'pstree | grep wmaker'):
         return 'wmaker'
     elif getoutput('pstree | grep fluxbox'):
         return 'fluxbox'
     elif getoutput('pstree | grep blackbox'):
         return 'blackbox'
     elif getoutput('pstree | grep wmii'):
         return 'wmii'
     elif getoutput('pstree | grep fvwm2'):
         return 'fvwm2'
     elif getoutput('pstree | grep icewm'):
         return 'icewm'
     elif getoutput('pstree | grep twm'):
         return 'twm'
     elif getoutput('pstree | grep jwm'):
         return 'jwm'
     else:
         from lazyscripts.gui.gtklib import user_choice
         return user_choice()