mirror of
https://github.com/slgobinath/SafeEyes.git
synced 2024-12-27 00:02:36 +01:00
Merge pull request #546 from antoninkriz/patch-1
Correctly detect GNOME in screensaver plugin and in utility.py
This commit is contained in:
commit
bbcae910ed
@ -64,7 +64,7 @@ def __lock_screen_command():
|
|||||||
return ['mate-screensaver-command', '--lock']
|
return ['mate-screensaver-command', '--lock']
|
||||||
elif desktop_session == 'kde' or 'plasma' in desktop_session or desktop_session.startswith('kubuntu') or os.environ.get('KDE_FULL_SESSION') == 'true':
|
elif desktop_session == 'kde' or 'plasma' in desktop_session or desktop_session.startswith('kubuntu') or os.environ.get('KDE_FULL_SESSION') == 'true':
|
||||||
return ['qdbus', 'org.freedesktop.ScreenSaver', '/ScreenSaver', 'Lock']
|
return ['qdbus', 'org.freedesktop.ScreenSaver', '/ScreenSaver', 'Lock']
|
||||||
elif desktop_session in ['gnome', 'unity', 'budgie-desktop'] or desktop_session.startswith('ubuntu'):
|
elif desktop_session in ['gnome', 'unity', 'budgie-desktop'] or desktop_session.startswith('ubuntu') or desktop_session.startswith('gnome'):
|
||||||
if utility.command_exist('gnome-screensaver-command'):
|
if utility.command_exist('gnome-screensaver-command'):
|
||||||
return ['gnome-screensaver-command', '--lock']
|
return ['gnome-screensaver-command', '--lock']
|
||||||
# From Gnome 3.8 no gnome-screensaver-command
|
# From Gnome 3.8 no gnome-screensaver-command
|
||||||
|
@ -274,7 +274,7 @@ def desktop_environment():
|
|||||||
env = 'lxde'
|
env = 'lxde'
|
||||||
elif 'plasma' in desktop_session or desktop_session.startswith('kubuntu') or os.environ.get('KDE_FULL_SESSION') == 'true':
|
elif 'plasma' in desktop_session or desktop_session.startswith('kubuntu') or os.environ.get('KDE_FULL_SESSION') == 'true':
|
||||||
env = 'kde'
|
env = 'kde'
|
||||||
elif os.environ.get('GNOME_DESKTOP_SESSION_ID'):
|
elif os.environ.get('GNOME_DESKTOP_SESSION_ID') or desktop_session.startswith('gnome'):
|
||||||
env = 'gnome'
|
env = 'gnome'
|
||||||
elif desktop_session.startswith('ubuntu'):
|
elif desktop_session.startswith('ubuntu'):
|
||||||
env = 'unity'
|
env = 'unity'
|
||||||
|
Loading…
Reference in New Issue
Block a user