diff options
author | Gonzalo Andreani <gonzaandreani@gmail.com> | 2017-10-07 23:42:25 -0700 |
---|---|---|
committer | Yegor Timoshenko <yegortimoshenko@gmail.com> | 2017-12-20 00:27:47 +0300 |
commit | c9c1ccda4f381c7982671e60135175cc66619dbe (patch) | |
tree | 5864d8be06e650c40d68d28f880fe58779fe5e9e /pkgs/desktops/xfce/core/xfce4-light-locker.patch | |
parent | ab754a40a289bb3153dad38c892a685e027c2f2f (diff) | |
download | nixlib-c9c1ccda4f381c7982671e60135175cc66619dbe.tar nixlib-c9c1ccda4f381c7982671e60135175cc66619dbe.tar.gz nixlib-c9c1ccda4f381c7982671e60135175cc66619dbe.tar.bz2 nixlib-c9c1ccda4f381c7982671e60135175cc66619dbe.tar.lz nixlib-c9c1ccda4f381c7982671e60135175cc66619dbe.tar.xz nixlib-c9c1ccda4f381c7982671e60135175cc66619dbe.tar.zst nixlib-c9c1ccda4f381c7982671e60135175cc66619dbe.zip |
xfce4-session: Backport lock command setting in xflock4
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
Diffstat (limited to 'pkgs/desktops/xfce/core/xfce4-light-locker.patch')
-rw-r--r-- | pkgs/desktops/xfce/core/xfce4-light-locker.patch | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/desktops/xfce/core/xfce4-light-locker.patch b/pkgs/desktops/xfce/core/xfce4-light-locker.patch index 4e1dcc1efa71..0fabdffd7ed6 100644 --- a/pkgs/desktops/xfce/core/xfce4-light-locker.patch +++ b/pkgs/desktops/xfce/core/xfce4-light-locker.patch @@ -1,16 +1,25 @@ --- ./scripts/xflock4.orig 2017-08-06 23:05:53.807688995 +0100 +++ ./scripts/xflock4 2017-08-06 23:09:06.171789989 +0100 -@@ -24,10 +24,11 @@ +@@ -24,12 +24,19 @ PATH=/bin:/usr/bin export PATH - + -# Lock by xscreensaver or gnome-screensaver, if a respective daemon is running -+# Lock by xscreensaver, gnome-screensaver or light-locker, 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 +- $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 |