4 if which "$1" >/dev/null 2>&1; then
12 ( "$@" >/dev/null 2>&1 & )
16 if pkill -0 -u "$(id -u)" "$1"; then
24 if [ "x$1" = "xoff" ] || [ "x$1" = "xstop" ] ; then
32 if cmd_exists slock && cmd_exists xautolock; then
33 if cmd_running "xautolock"; then
34 if should_stop "$1"; then
38 if ! should_stop "$1"; then
39 fork xautolock -notifier true -bell 0 -locker slock;
42 elif cmd_exists xscreensaver && [ -e ~/.xscreensaver ]; then
43 if cmd_running "xscreensaver"; then
44 if should_stop "$1"; then
45 xscreensaver-command -exit;
48 if ! should_stop "$1"; then
49 fork XENVIRONMENT=~/.xscreensaver /usr/bin/xscreensaver;
52 elif cmd_exists xautolock; then
53 if cmd_running "xautolock"; then
54 if should_stop "$1"; then
58 if ! should_stop "$1"; then
59 fork xautolock -notifier true -bell 0;