mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
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:
parent
e12c43e404
commit
405df2ef3c
1
Jamfile
1
Jamfile
@ -26,6 +26,7 @@ SubInclude TOP ede-desktop-conf ;
|
||||
SubInclude TOP ede-dialog ;
|
||||
SubInclude TOP ede-keyboard-conf ;
|
||||
SubInclude TOP ede-screensaver-conf ;
|
||||
SubInclude TOP ede-screen-lock ;
|
||||
SubInclude TOP ede-help ;
|
||||
SubInclude TOP ede-image-view ;
|
||||
SubInclude TOP elma ;
|
||||
|
@ -48,7 +48,7 @@ url="file://$url"
|
||||
# try to find browser
|
||||
if [ "x$BROWSER" = "x" ]; then
|
||||
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"
|
||||
break;
|
||||
fi
|
||||
|
13
ede-screen-lock/Jamfile
Normal file
13
ede-screen-lock/Jamfile
Normal 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
28
ede-screen-lock/ede-screen-lock
Executable 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
|
Loading…
Reference in New Issue
Block a user