diff --git a/README.md b/README.md index dbf04797..afd14ee9 100644 --- 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 (:key to run) [max 15] | +| `NNN_PLUG='m:nmount;t:imgthumb;x:_chmod +x $NNN'` | key-plugin (or cmd) pairs (:key 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 2eb55895..0f94c96f 100644 --- 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 diff --git a/plugins/README.md b/plugins/README.md index f1146e79..11b7578f 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -4,7 +4,7 @@

read ebooks with plugin gutenread (Android)

-

image preview with plugin thumb

+

image preview with plugin imgthumb

## 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,
sort uniq xargs | -| checksum | Create and verify checksums | sh | md5sum,
sha256sum | +| chksum | Create and verify checksums | sh | md5sum,
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
(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
[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,
pico2wave | | pdfview | View PDF file in `$PAGER` | sh | pdftotext/
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,
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),
[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 :key: - 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 :o, `mocplay` can be run with :p 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 diff --git a/plugins/checksum b/plugins/chksum similarity index 100% rename from plugins/checksum rename to plugins/chksum diff --git a/plugins/ndiff b/plugins/diffs similarity index 100% rename from plugins/ndiff rename to plugins/diffs diff --git a/plugins/sxiv b/plugins/imgsxiv similarity index 100% rename from plugins/sxiv rename to plugins/imgsxiv diff --git a/plugins/thumb b/plugins/imgthumb similarity index 100% rename from plugins/thumb rename to plugins/imgthumb diff --git a/plugins/viuimg b/plugins/imgviu similarity index 100% rename from plugins/viuimg rename to plugins/imgviu diff --git a/plugins/readit b/plugins/pdfread similarity index 100% rename from plugins/readit rename to plugins/pdfread