-if [ -x /usr/bin/xscreensaver -a -e ~/.xscreensaver ]; then
- ( XENVIRONMENT=~/.xscreensaver /usr/bin/xscreensaver >/dev/null 2>&1 &)
-elif [ -x /usr/bin/xautolock ]; then
- (/usr/bin/xautolock -notifier true -bell 0 >/de/vnull 2>&1 &)
+if cmd_exists slock && cmd_exists xautolock; then
+ fork xautolock -notifer true -bell 0 -locker slock;
+elif cmd_exists xscreensaver && [ -e ~/.xscreensaver ]; then
+ fork XENVIRONMENT=~/.xscreensaver /usr/bin/xscreensaver;
+elif cmd_exists xautolock; then
+ fork xautolock -notifer true -bell 0;