Pārlūkot izejas kodu

Integrate bashlock and lock

master
Arun Prakash Jana pirms 6 gadiem
vecāks
revīzija
776c94a744
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: A75979F35C080412
5 mainītis faili ar 11 papildinājumiem un 18 dzēšanām
  1. +2
    -2
      README.md
  2. +8
    -7
      nlay
  3. +1
    -1
      nlay.1
  4. +0
    -4
      nnn.c
  5. +0
    -4
      nnn.h

+ 2
- 2
README.md Parādīt failu

@@ -109,7 +109,7 @@ Have fun with it! Missing a feature? Want to contribute? Head to the rolling [To
- Change directory at exit (*easy* shell integration)
- Open any file in EDITOR (fallback vi) or PAGER (fallback less)
- Open current directory in a custom GUI file manager
- Terminal screensaver/locker (default vlock, customizable) integration
- Terminal screensaver/locker integration
- Unicode support
- Highly optimized code, minimal resource usage

@@ -303,7 +303,7 @@ The following indicators are used in the detail view:
| gnome-search-tool, catfish | desktop search utility |
| atool, patool ([integration](#integrate-patool)) | create, list and extract archives |
| vidir from moreutils | batch rename, move, delete dir entries |
| vlock (Linux) | terminal locker |
| vlock (Linux), bashlock (OS X), lock (BSD) | terminal locker |
| $EDITOR ($VISUAL, if defined) | edit files (fallback vi) |
| $PAGER | page through files (fallback less) |
| $SHELL | spawn a shell, run script (fallback sh) |


+ 8
- 7
nlay Parādīt failu

@@ -74,15 +74,16 @@ elif [ "$2" == "search" ]; then

#--------------- SCREENSAVER ----------------
elif [ "$2" == "screensaver" ]; then
app=vlock
app=("vlock"
"bashlock"
"lock")

#opts=

#bg=">/dev/null 2>&1 &"

type -P $app &>/dev/null &&
eval $app $opts $bg
for index in ${!app[@]}
do
type -P ${app[$index]} &>/dev/null &&
eval ${app[$index]} &&
exit 0
done

#------------------ SCRIPT ------------------
elif [ "$2" == "script" ]; then


+ 1
- 1
nlay.1 Parādīt failu

@@ -11,7 +11,7 @@ file/path type/action
.Nm
is shipped with \fInnn\fR to deliver a level of flexibility to users to choose their own apps when running some actions, run some commands or custom scripts. It has provisions to handle text files too. However, the capability is not used in the latest releases. Now
.Nm
is invoked to run a desktop search utility (\fIgnome-search-tool\fR or \fIcatfish\fR in the same order of priority) or screen locker (\fIvlock\fR, Linux-only). However,
is invoked to run a desktop search (\fIgnome-search-tool\fR or \fIcatfish\fR) or screen locker (\fIvlock\fR or \fIbashlock\fR or \fIlock\fR) utility. However,
.Nm
can run independently and can be highly customized for personal usage.
.Pp


+ 0
- 4
nnn.c Parādīt failu

@@ -1953,9 +1953,7 @@ show_help(char *path)
"d^Y | Toggle multi-copy\n"
"d^T | Toggle path quote\n"
"d^L | Redraw, clear prompt\n"
#ifdef __linux__
"eL | Lock terminal\n"
#endif
"e? | Help, settings\n"
"aQ, ^G | Quit and cd\n"
"aq, ^X | Quit\n\n"};
@@ -3241,11 +3239,9 @@ nochange:
run = editor ? editor : xgetenv("EDITOR", "vi");
spawn(run, dents[cur].name, NULL, path, F_NORMAL);
break;
#ifdef __linux__
case SEL_LOCK:
spawn(player, "", "screensaver", NULL, F_NORMAL | F_SIGINT);
break;
#endif
case SEL_CDQUIT:
{
tmp = getenv("NNN_TMPFILE");


+ 0
- 4
nnn.h Parādīt failu

@@ -45,9 +45,7 @@ enum action {
SEL_RUN,
SEL_RUNSCRIPT,
SEL_RUNARG,
#ifdef __linux__
SEL_LOCK,
#endif
SEL_CDQUIT,
SEL_QUIT,
};
@@ -180,10 +178,8 @@ static struct key bindings[] = {
/* Run command with argument */
{ 'e', SEL_RUNARG, "", "VISUAL" },
{ 'p', SEL_RUNARG, "less", "PAGER" },
#ifdef __linux__
/* Lock screen */
{ 'L', SEL_LOCK, "", "" },
#endif
/* Change dir on quit */
{ 'Q', SEL_CDQUIT, "", "" },
{ CONTROL('G'), SEL_CDQUIT, "", "" },


Notiek ielāde…
Atcelt
Saglabāt