aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-06-05 10:35:37 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-06-05 10:35:37 +0530
commit4a98d8db50e2585fc1e02925fe257ac9654e2bdc (patch)
tree50cd7f5d6533c150188adabc742ca161e800e067
parentc7f83dd17992d029859aef8642fc72dcd9ade87a (diff)
downloadnnn-4a98d8db50e2585fc1e02925fe257ac9654e2bdc.tar.gz
Use pipes.sh as locker fallback
-rw-r--r--README.md2
-rw-r--r--src/nnn.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index fb56318..16fc853 100644
--- a/README.md
+++ b/README.md
@@ -135,7 +135,7 @@ The following table is a complete list. Some of the utilities may be installed b
| mediainfo / exiftool | multimedia file details |
| trash-cli | trash files (default action: delete) |
| sshfs, fusermount(3) | mount, unmount remote over SSHFS |
-| vlock (Linux), bashlock (macOS), lock(1) (BSD) | terminal locker |
+| vlock (Linux), bashlock (macOS), lock(1) (BSD) | terminal locker (fallback: [pipes.sh](https://github.com/pipeseroni/pipes.sh)) |
| advcpmv (Linux) ([integration](https://github.com/jarun/nnn/wiki/hacking-nnn#show-cp-mv-progress)) | copy, move progress |
| `$VISUAL` (else `$EDITOR`), `$PAGER` (less, most), `$SHELL` | fallback vi, less, sh |
diff --git a/src/nnn.c b/src/nnn.c
index 6d953b8..7d514de 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4252,7 +4252,11 @@ nochange:
/* Locker */
if (idletimeout && idle == idletimeout) {
idle = 0;
- spawn(utils[LOCKER], NULL, NULL, NULL, F_NORMAL);
+ tmp = utils[LOCKER];
+ if (!getutil(tmp))
+ tmp = "pipes.sh";
+
+ spawn(tmp, NULL, NULL, NULL, F_NORMAL);
if (ndents)
copycurname();
goto begin;