Importing new ede-screen-lock tool, a wrapper around various locking engines. Also modified ede-help to

use 'command -v' instead of 'which', making it more portable.
This commit is contained in:
Sanel Zukan 2012-04-02 18:59:07 +00:00
parent e12c43e404
commit 405df2ef3c
4 changed files with 43 additions and 1 deletions

View File

@ -26,6 +26,7 @@ SubInclude TOP ede-desktop-conf ;
SubInclude TOP ede-dialog ; SubInclude TOP ede-dialog ;
SubInclude TOP ede-keyboard-conf ; SubInclude TOP ede-keyboard-conf ;
SubInclude TOP ede-screensaver-conf ; SubInclude TOP ede-screensaver-conf ;
SubInclude TOP ede-screen-lock ;
SubInclude TOP ede-help ; SubInclude TOP ede-help ;
SubInclude TOP ede-image-view ; SubInclude TOP ede-image-view ;
SubInclude TOP elma ; SubInclude TOP elma ;

View File

@ -48,7 +48,7 @@ url="file://$url"
# try to find browser # try to find browser
if [ "x$BROWSER" = "x" ]; then if [ "x$BROWSER" = "x" ]; then
for i in $browser_list; do for i in $browser_list; do
if which $i > /dev/null 2>&1; then if command -v $i > /dev/null 2>&1; then
BROWSER="$i" BROWSER="$i"
break; break;
fi fi

13
ede-screen-lock/Jamfile Normal file
View File

@ -0,0 +1,13 @@
#
# $Id: Jamfile 2496 2009-02-20 15:29:11Z karijes $
#
# Part of Equinox Desktop Environment (EDE).
# Copyright (c) 2012 EDE Authors.
#
# This program is licensed under the terms of the
# GNU General Public License version 2 or later.
# See COPYING for the details.
SubDir TOP ede-screen-lock ;
InstallEdeProgram ede-screen-lock ;

28
ede-screen-lock/ede-screen-lock Executable file
View File

@ -0,0 +1,28 @@
#!/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