NOTES:
1. To run a plugin directly, press \fI;\fR followed by the plugin key
- 2. To skip directory refresh after running a plugin,prefix with \fB-\fR
+ 2. To skip directory refresh after running a plugin, prefix with \fB-\fR
export NNN_PLUG='m:-mediainfo'
.Ed
export NNN_PLUG='y:-_sync*'
+ 6. To run a \fIGUI app as plugin\fR, add a \fB|\fR after \fB_\fR
+
+ export NNN_PLUG='m:-_|mousepad $nnn'
+
EXAMPLES:
----------------------------------- + -------------------------------------------------
Key:Command | Description
l:_git log | Show git log
n:-_vi /home/user/Dropbox/dir/note* | Take quick notes in a synced file/dir of notes
p:-_less -iR $nnn* | Page through hovered file in less
- s:_smplayer -minigui $nnn* | Play hovered media file, even unfinished download
+ s:-_|smplayer -minigui $nnn | Play hovered media file, even unfinished download
x:_chmod +x $nnn | Make the hovered file executable
y:-_sync* | Flush cached writes
----------------------------------- + -------------------------------------------------
Now there will be no prompt after <kbd>;s</kbd> and <kbd>;n</kbd>.
+#### Run GUI app as plugin
+
+To run a GUI app as plugin, add a `|` after `_`. For example:
+
+ export NNN_PLUG='m:-_|mousepad $nnn'
+
Notes:
1. Use single quotes for `$NNN_PLUG` so `$nnn` is not interpreted
| `l:_git log` | Show git log |
| `n:-_vi /home/user/Dropbox/dir/note*` | Take quick notes in a synced file/dir of notes |
| `p:-_less -iR $nnn*` | Page through hovered file in less |
-| `s:_smplayer -minigui $nnn*` | Play hovered media file, even unfinished download |
+| `s:-_\|smplayer -minigui $nnn` | Play hovered media file, even unfinished download |
| `x:_chmod +x $nnn` | Make the hovered file executable |
| `y:-_sync*` | Flush cached writes |
if (!*file)
return FALSE;
+ /* Check if GUI flags are to be used */
+ if (*file == '|') {
+ flags = F_NOTRACE | F_NOWAIT;
+ ++file;
+
+ if (!*file)
+ return FALSE;
+ }
+
xstrlcpy(newpath, file, PATH_MAX);
len = strlen(newpath);
if (len > 1 && newpath[len - 1] == '*') {
- flags &= ~F_CONFIRM; /* GUI case */
- newpath[len - 1] = '\0'; /* Get rid of trailing nowait symbol */
+ flags &= ~F_CONFIRM; /* Skip user confirmation */
+ newpath[len - 1] = '\0'; /* Get rid of trailing no confirmation symbol */
--len;
}