~whise/screenlets/Screenlets-new

« back to all changes in this revision

Viewing changes to src/share/screenlets-manager/screenlets-manager.py

  • Committer: Helder
  • Date: 2008-01-25 10:12:17 UTC
  • Revision ID: helder@helder-laptop-20080125101217-2fmsp9gxsbj3zeq8
Fixed kde suatostart , added autostart for xfce

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
        USER = 1
57
57
        DIR_USER                = os.environ['HOME'] + '/.screenlets'
58
58
        
59
 
        if os.environ['DESKTOP_SESSION'].startswith('kde'):
 
59
 
 
60
 
 
61
        desktop_environment = 'gnome'
 
62
 
 
63
        if os.environ.get('KDE_FULL_SESSION') == 'true':
 
64
            desktop_environment = 'kde'
 
65
        elif os.environ.get('GNOME_DESKTOP_SESSION_ID'):
 
66
            desktop_environment = 'gnome'
 
67
        else:
 
68
            try:
 
69
                import commands
 
70
                info = commands.getoutput('xprop -root _DT_SAVE_MODE')
 
71
                if ' = "xfce4"' in info:
 
72
                    desktop_environment = 'xfce'
 
73
            except (OSError, RuntimeError):
 
74
                pass
 
75
 
 
76
        print 'It looks like you are running '+ desktop_environment
 
77
 
 
78
        if desktop_environment == 'kde':
60
79
                DIR_AUTOSTART   = os.environ['HOME'] + '/.kde/Autostart/'
61
 
        else:
 
80
        elif desktop_environment == 'gnome':
62
81
                DIR_AUTOSTART   = os.environ['HOME'] + '/.config/autostart/'
 
82
        elif desktop_environment == 'xfce':
 
83
                DIR_AUTOSTART   = os.environ['HOME'] + '/Desktop/Autostart/'
63
84
 
64
85
DIR_CONFIG = os.environ['HOME'] + '/.config/Screenlets'
65
86