summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarno Ilari Suni <8@iki.fi>2021-04-06 14:46:45 +0300
committerAndre Miranda <andreldm@xfce.org>2022-03-05 15:34:25 -0300
commite4312c4983678b8bf8d0ab475700e95528a62ec5 (patch)
treeae77752ce723257fa3da475c56be7d729b3d3ae2
parent9cfe06623135569f86b1ac858a79e93dbecbe9a3 (diff)
downloadxfce4-session-e4312c4983678b8bf8d0ab475700e95528a62ec5.tar.gz
xflock4: Apply initial delay before running a screensaver/locker (#29)
This is done only if the script is run in terminal to prevent unintentional exposing the lock screen right away. Xflock4 (!20)
-rwxr-xr-xscripts/xflock44
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/xflock4 b/scripts/xflock4
index 56d81b8f..bff32b2e 100755
--- a/scripts/xflock4
+++ b/scripts/xflock4
@@ -22,6 +22,10 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+# Wait a bit so that user have time to raise finger from a key if
+# the script is run in terminal.
+[ -t 0 ] && sleep 1
+
# First test for the command set in the session's xfconf channel
LOCK_CMD=$(xfconf-query -c xfce4-session -p /general/LockCommand)