[Xfce4-commits] <xfce4-session:nick/xfce-utils-merge> Add xflock4 from xfce-utils.

Nick Schermer noreply at xfce.org
Sun Jul 24 21:46:01 CEST 2011


Updating branch refs/heads/nick/xfce-utils-merge
         to 27cb6680005b44b8ee620ddd8b45d3d02365a208 (commit)
       from b003ab58e4760ef655e52ab1b3e4288e483259c8 (commit)

commit 27cb6680005b44b8ee620ddd8b45d3d02365a208
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Jul 24 21:45:15 2011 +0200

    Add xflock4 from xfce-utils.

 scripts/Makefile.am |    3 ++-
 scripts/xflock4     |   31 +++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 0ad26d5..b1b4b6e 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,5 +1,6 @@
 bin_SCRIPTS= \
-	startxfce4
+	startxfce4 \
+	xflock4
 
 # cannot be set from configure, because ${prefix} is not expanded
 edit = sed \
diff --git a/scripts/xflock4 b/scripts/xflock4
new file mode 100644
index 0000000..fcf3323
--- /dev/null
+++ b/scripts/xflock4
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+#  xfce4
+#
+#  Copyright (C) 1999, 2003 Olivier Fourdan (fourdan at xfce.org)
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+if test x"`which xscreensaver-command 2>/dev/null`" != x""; then
+    xscreensaver-command -lock 
+elif test x"`which gnome-screensaver-command 2>/dev/null`" != x""; then
+    gnome-screensaver-command --lock
+elif test x"`which slock 2>/dev/null`" != x""; then
+   slock
+else
+    xlock $*
+fi
+exit 0


More information about the Xfce4-commits mailing list