]> Sergey Matveev's repositories - nnn.git/commitdiff
Rename plugins, group related ones
authorArun Prakash Jana <engineerarun@gmail.com>
Fri, 22 Nov 2019 12:21:13 +0000 (17:51 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Fri, 22 Nov 2019 12:21:13 +0000 (17:51 +0530)
README.md
nnn.1
plugins/README.md
plugins/chksum [moved from plugins/checksum with 100% similarity]
plugins/diffs [moved from plugins/ndiff with 100% similarity]
plugins/imgsxiv [moved from plugins/sxiv with 100% similarity]
plugins/imgthumb [moved from plugins/thumb with 100% similarity]
plugins/imgviu [moved from plugins/viuimg with 100% similarity]
plugins/pdfread [moved from plugins/readit with 100% similarity]

index dbf0479741cc475d8fbfda255c6472002798a962..afd14ee9f5673c2d3cceb11af7d6c50afc09f4c5 100644 (file)
--- a/README.md
+++ b/README.md
@@ -147,7 +147,7 @@ There is no config file. Associated files are stored under `${XDG_CONFIG_HOME:-$
 | Example `export` | Description |
 | --- | --- |
 | `NNN_BMS='d:~/Documents;D:~/Docs archive/'` | key-bookmark pairs [max 10] |
-| `NNN_PLUG='m:nmount;t:thumb;x:_chmod +x $NNN'` | key-plugin (or cmd) pairs (<kbd>:key</kbd> to run) [max 15] |
+| `NNN_PLUG='m:nmount;t:imgthumb;x:_chmod +x $NNN'` | key-plugin (or cmd) pairs (<kbd>:key</kbd> to run) [max 15] |
 | `NNN_USE_EDITOR=1` | open text files in `$VISUAL` (else `$EDITOR`, fallback vi) |
 | `NNN_CONTEXT_COLORS='1234'` | specify per context color [default: '4444' (all blue)] |
 | `NNN_SSHFS_OPTS='sshfs -o reconnect,idmap=user'` | specify SSHFS options |
diff --git a/nnn.1 b/nnn.1
index 2eb55895f5377c373e0b7c633a805e00e9a5cb7d..0f94c96ff19c7cf787498efdf165bd3476cd5ee3 100644 (file)
--- a/nnn.1
+++ b/nnn.1
@@ -184,7 +184,7 @@ when dealing with the !, e and p commands respectively. A single combination to
 \fBNNN_PLUG:\fR directly executable plugins as \fIkey_char:location\fR pairs (max 10) separated by
 \fI;\fR:
 .Bd -literal
-    export NNN_PLUG='o:fzy-open;p:mocplay;d:ndiff;m:nmount;t:thumb;i:mediainf'
+    export NNN_PLUG='o:fzopen;p:mocplay;d:diffs;m:nmount;t:imgthumb;i:mediainf'
 
     NOTE: To run a plugin directly, press \fI:\fR followed by the plugin key.
 .Ed
index f1146e79b6094d8bd00ac712e1092820ed08adfc..11b7578f8e13127283b93bf0d98bb63602d331ce 100644 (file)
@@ -4,7 +4,7 @@
 <p align="center"><i>read ebooks with plugin gutenread (Android)</i></p>
 
 <p align="center"><img src="https://i.imgur.com/14iPDIq.png" /></p>
-<p align="center"><i>image preview with plugin thumb</i></p>
+<p align="center"><i>image preview with plugin imgthumb</i></p>
 
 ## Introduction
 
@@ -16,7 +16,8 @@ Plugins extend the capabilities of `nnn`. They are _executable_ scripts (or bina
 | --- | --- | --- | --- |
 | boom | Play random music from dir | sh | [moc](http://moc.daper.net/) |
 | dups | List non-empty duplicate files in current dir | sh | find, md5sum,<br>sort uniq xargs |
-| checksum | Create and verify checksums | sh | md5sum,<br>sha256sum |
+| chksum | Create and verify checksums | sh | md5sum,<br>sha256sum |
+| diffs | Diff for selection (limited to 2 for directories) | sh | vimdiff |
 | dragdrop | Drag/drop files from/into nnn | sh | [dragon](https://github.com/mwh/dragon) |
 | exetoggle | Toggle executable status of hovered file | sh | chmod |
 | fzcd | Change to the directory of a fuzzy-selected file/dir | sh | fzy/fzf<br>(optional fd) |
@@ -26,33 +27,32 @@ Plugins extend the capabilities of `nnn`. They are _executable_ scripts (or bina
 | gutenread | Browse, download, read from Project Gutenberg | sh | curl, unzip, w3m<br>[epr](https://github.com/wustho/epr) (optional) |
 | hexview | View a file in hex in `$PAGER` | sh | xxd |
 | imgresize | Resize images in dir to screen resolution | sh | [imgp](https://github.com/jarun/imgp) |
+| imgsxiv | Browse images, set wallpaper, copy path ([config](https://wiki.archlinux.org/index.php/Sxiv#Assigning_keyboard_shortcuts)), [rename](https://github.com/jarun/nnn/wiki/Basic-use-cases#browse-rename-images)| sh | sxiv |
+| imgthumb | View thumbnail of an image or dir of images | sh | [lsix](https://github.com/hackerb9/lsix) |
 | imgur | Upload an image to imgur (from [imgur-screenshot](https://github.com/jomo/imgur-screenshot)) | bash | - |
+| imgviu | View an image or images in dir in `$PAGER` | sh | [viu](https://github.com/atanunq/viu), less |
 | ipinfo | Fetch external IP address and whois information | sh | curl, whois |
 | kdeconnect | Send selected files to an Android device | sh | kdeconnect-cli |
 | mediainf | Show media information | sh | mediainfo |
 | moclyrics | Show lyrics of the track playing in moc | sh | [ddgr](https://github.com/jarun/ddgr), [moc](http://moc.daper.net/) |
 | mocplay | Append (and/or play) selection/dir/file in moc | sh | [moc](http://moc.daper.net/) |
-| ndiff | Diff for selection (limited to 2 for directories) | sh | vimdiff |
 | nmount | Toggle mount status of a device as normal user | sh | pmount, udisks2 |
 | notes | Open a quick notes file/dir in `$EDITOR` | sh | - |
 | oldbigfile | List large files by access time | sh | find, sort |
 | organize | Auto-organize files in directories by file type | sh | file |
 | pastebin | Paste contents of a text a file ix.io | sh | - |
+| pdfread | Read a PDF or text file aloud | sh | pdftotext, mpv,<br>pico2wave |
 | pdfview | View PDF file in `$PAGER` | sh | pdftotext/<br>mupdf-tools |
 | picker | Pick files and list one per line (to pipe) | sh | nnn |
 | pskill | Fuzzy list by name and kill process or zombie | sh | fzy, sudo/doas |
-| readit | Read a PDF or text file aloud | sh | pdftotext, mpv,<br>pico2wave |
 | ringtone | Create a variable bitrate mp3 ringtone from file | sh | date, ffmpeg |
 | splitjoin | Split file or join selection | sh | split, cat |
 | suedit | Edit file using superuser permissions | sh | sudoedit/sudo/doas |
-| sxiv | Browse images, set wallpaper, copy path ([config](https://wiki.archlinux.org/index.php/Sxiv#Assigning_keyboard_shortcuts)), [rename](https://github.com/jarun/nnn/wiki/Basic-use-cases#browse-rename-images)| sh | sxiv |
-| thumb | View thumbnail of an image or dir of images | sh | [lsix](https://github.com/hackerb9/lsix) |
 | transfer | Upload file to transfer.sh | sh | curl |
 | treeview | Informative tree output in `$EDITOR` | sh | tree |
 | uidgid | List user and group of all files in dir | sh | ls, less |
 | upgrade | Upgrade nnn manually on Debian 9 Stretch | sh | curl |
 | vidthumb | Show video thumbnails in terminal | sh | [ffmpegthumbnailer](https://github.com/dirkvdb/ffmpegthumbnailer),<br>[lsix](https://github.com/hackerb9/lsix) |
-| viuimg | View an image or images in dir in `$PAGER` | sh | [viu](https://github.com/atanunq/viu), less |
 | wall | Set wallpaper or change colorscheme | sh | nitrogen/pywal |
 
 ## Installing plugins
@@ -69,7 +69,7 @@ Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`. You ca
 
 **Method 1:** Directly with <kbd>:key</kbd>:
 
-    export NNN_PLUG='o:fzopen;p:mocplay;d:ndiff;m:nmount;n:notes;v:viuimg;t:thumb'
+    export NNN_PLUG='o:fzopen;p:mocplay;d:diffs;m:nmount;n:notes;v:imgviu;t:imgthumb'
 
 Now plugin `fzopen` can be run with the keybind <kbd>:o</kbd>, `mocplay` can be run with <kbd>:p</kbd> and so on... The key vs. plugin pairs are shown in the help and config screen.
 
@@ -98,7 +98,7 @@ When `nnn` executes a plugin, it does the following:
     2. The working directory (might differ from `$PWD` in case of symlinked paths; non-canonical). Note that the second argument is not passed in case of commands starting with `_`.
 - Sets the environment variable `NNN_PIPE` used to control `nnn` active directory.
 
-Plugins can also access the current selections by reading the `.selections` file in the config directory (See the `ndiff` plugin for example).
+Plugins can also access the current selections by reading the `.selections` file in the config directory (See the `diffs` plugin for example).
 
 ## Create your own plugins
 
similarity index 100%
rename from plugins/checksum
rename to plugins/chksum
similarity index 100%
rename from plugins/ndiff
rename to plugins/diffs
similarity index 100%
rename from plugins/sxiv
rename to plugins/imgsxiv
similarity index 100%
rename from plugins/thumb
rename to plugins/imgthumb
similarity index 100%
rename from plugins/viuimg
rename to plugins/imgviu
similarity index 100%
rename from plugins/readit
rename to plugins/pdfread