mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
29 lines
527 B
Plaintext
29 lines
527 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
program="ede-screen-lock"
|
||
|
|
||
|
if [ "$1" = "--help" ]; then
|
||
|
cat <<EOF
|
||
|
Usage: $program [OPTIONS]
|
||
|
Lock screen for current user
|
||
|
|
||
|
Options:
|
||
|
--help this help
|
||
|
|
||
|
EOF
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if `command -v xscreensaver-command > /dev/null 2>&1`; then
|
||
|
lock_cmd="xscreensaver-command -lock"
|
||
|
elif `command -v xlock > /dev/null 2>&1`; then
|
||
|
lock_cmd="xlock"
|
||
|
fi
|
||
|
|
||
|
if [ "x$lock_cmd" = "x" ]; then
|
||
|
ede-dialog --error "Unable to find any known locker. Please install xscreensaver or xlock to enable screen lock in EDE"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
$lock_cmd
|