Use pipes.sh as locker fallback

This commit is contained in:
Arun Prakash Jana 2019-06-05 10:35:37 +05:30
parent c7f83dd179
commit 4a98d8db50
No known key found for this signature in database
GPG key ID: A75979F35C080412
2 changed files with 6 additions and 2 deletions

View file

@ -135,7 +135,7 @@ The following table is a complete list. Some of the utilities may be installed b
| mediainfo / exiftool | multimedia file details | | mediainfo / exiftool | multimedia file details |
| trash-cli | trash files (default action: delete) | | trash-cli | trash files (default action: delete) |
| sshfs, fusermount(3) | mount, unmount remote over SSHFS | | 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 | | 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 | | `$VISUAL` (else `$EDITOR`), `$PAGER` (less, most), `$SHELL` | fallback vi, less, sh |

View file

@ -4252,7 +4252,11 @@ nochange:
/* Locker */ /* Locker */
if (idletimeout && idle == idletimeout) { if (idletimeout && idle == idletimeout) {
idle = 0; 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) if (ndents)
copycurname(); copycurname();
goto begin; goto begin;