mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 03:34:58 +00:00
c9c1ccda4f
Up until xfce 4.13, xflock4 only had support for "whitelisted" (*cough* hardcoded *cough*) locks screens. Version 4.13 added the ability for the user to specify the lock command via the xfce settings. This PR backports that functionality https://github.com/xfce-mirror/xfce4-session/blob/xfce4-session-4.13.0/scripts/xflock4
26 lines
866 B
Diff
26 lines
866 B
Diff
--- ./scripts/xflock4.orig 2017-08-06 23:05:53.807688995 +0100
|
|
+++ ./scripts/xflock4 2017-08-06 23:09:06.171789989 +0100
|
|
@@ -24,12 +24,19 @
|
|
PATH=/bin:/usr/bin
|
|
export PATH
|
|
|
|
-# Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
|
|
+# First test for the command set in the session's xfconf channel
|
|
+LOCK_CMD=$(xfconf-query -c xfce4-session -p /general/LockCommand)
|
|
+
|
|
+# Lock by xscreensaver, gnome-screensaver, or light-locker, if a respective daemon is running
|
|
for lock_cmd in \
|
|
+ "$LOCK_CMD" \
|
|
"xscreensaver-command -lock" \
|
|
- "gnome-screensaver-command --lock"
|
|
+ "gnome-screensaver-command --lock" \
|
|
+ "light-locker-command -l"
|
|
do
|
|
- $lock_cmd >/dev/null 2>&1 && exit
|
|
+ if [ ! -z "$lock_cmd" ]; then
|
|
+ $lock_cmd >/dev/null 2>&1 && exit
|
|
+ fi
|
|
done
|
|
|
|
# else run another access locking utility, if installed
|