Skip to content

Commit

Permalink
xscreensaver support
Browse files Browse the repository at this point in the history
this should work on non-standard desktop environments (e.g. mine is
Xmonad) by detecting if the daemon is running when the command exists

obviously, if a user is running a xscreensaver in a standard DE, that
won't work, but that should be uncommon enough to not cause problems
  • Loading branch information
anarcat committed Aug 25, 2017
1 parent 488d38c commit 6a8b29a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions safeeyes/Utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ def lock_screen_command():
if 'deprecated' not in os.environ.get('GNOME_DESKTOP_SESSION_ID') and command_exist('gnome-screensaver-command'):
# Gnome 2
return ['gnome-screensaver-command', '--lock']
elif command_exist('xscreensaver-command'):
# this will fail if the daemon is not running
return os.system('xscreensaver-command -version > /dev/null') == 0
return None


Expand Down

0 comments on commit 6a8b29a

Please sign in to comment.