README.md | 2 +- plugins/README.md | 12 ++++++++---- plugins/getplugs | 2 +- plugins/upgrade | 2 +- diff --git a/README.md b/README.md index feedb2e38de7a16fb1382c056fff9d0ad477ee4e..697608002c472f2952b1935dd04836fd083b9e68 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ #### Important links - [Wiki](https://github.com/jarun/nnn/wiki): operational concepts, how tos, use cases, chronology and insights - [Performance numbers](https://github.com/jarun/nnn/wiki/Performance) -- [Plugin repository](https://github.com/jarun/nnn/tree/master/plugins) +- [Plugin repository and docs](https://github.com/jarun/nnn/tree/master/plugins) - [(neo)vim plugin](https://github.com/mcchrish/nnn.vim) - [`nnn` on Android](https://www.youtube.com/watch?v=AbaauM7gUJw) diff --git a/plugins/README.md b/plugins/README.md index ace537504b20e05f998537077fd87d0e774fd76f..8ee61b85ce824405cd6132bf2d0aeddac1b39f19 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -1,4 +1,4 @@ -To extend the capabilities of `nnn`, plugins are introduced. Plugins are scripts which `nnn` can communicate with and trigger. This mechanism fits perfectly with the fundamental design to keep the core file manager lean and fast, by delegating repetitive (but not necessarily file manager-specific) tasks to the plugins. +Plugins extend the capabilities of `nnn`. They are scripts which `nnn` can communicate with and trigger. This mechanism fits perfectly with the fundamental design to keep the core file manager lean and fast, by delegating repetitive (but not necessarily file manager-specific) tasks to the plugins. The currently available plugins are listed below. @@ -8,7 +8,7 @@ | boom | sh | [moc](http://moc.daper.net/) | Play random music from dir | | dups | sh | find, md5sum,
sort uniq xargs | List non-empty duplicate files in current dir | | checksum | sh | md5sum,
sha256sum | Create and verify checksums | | fzy-open | sh | fzy, xdg-open | Fuzzy find a file in dir subtree and edit or xdg-open | -| getplugs | sh | wget | Update plugins | +| getplugs | sh | curl | Update plugins | | hexview | sh | xxd | View a file in hex in `$PAGER` | | imgresize | sh | [imgp](https://github.com/jarun/imgp) | Resize images in dir to screen resolution | | imgur | bash | - | Upload an image to imgur (from [imgur-screenshot](https://github.com/jomo/imgur-screenshot)) | @@ -33,13 +33,17 @@ | splitjoin | sh | split, cat | Split file or join selection | | sxiv | sh | sxiv | View images in dir, set wallpaper, copy path ([config](https://wiki.archlinux.org/index.php/Sxiv#Assigning_keyboard_shortcuts))| | thumb | sh | [lsix](https://github.com/hackerb9/lsix) | View thumbnail of an image or dir of images | | transfer | sh | curl | Upload file to transfer.sh | -| upgrade | sh | wget | Upgrade nnn manually on Debian 9 Stretch | +| upgrade | sh | curl | Upgrade nnn manually on Debian 9 Stretch | | vidthumb | sh | [ffmpegthumbnailer](https://github.com/dirkvdb/ffmpegthumbnailer),
[lsix](https://github.com/hackerb9/lsix) | Show video thumbnails in terminal | | viuimg | sh | [viu](https://github.com/atanunq/viu), less | View an image or images in dir | ## Installing plugins -Download the `getplugs` plugin and execute it anywhere to get all the plugins installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`. You can run it again later to update the plugins. It backs up earlier plugins. +The following command installs all plugins: + + curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs | sh + +Plugins are installed to `${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins`. You can run the `getplugs` plugin later to update the plugins. It backs up earlier plugins. **NOTE:** `getplugs` also downloads the launcher `nlaunch` and tries to place it at `/usr/local/bin/` using `sudo`. If it fails you have to place `nlauch` manually somewhere in your `$PATH`. diff --git a/plugins/getplugs b/plugins/getplugs index a8d8ec185e1b3423a2b1559a0e9dbe6462b84ac0..e144be39c075257ef5d61086ebd6ebe00da478cc 100755 --- a/plugins/getplugs +++ b/plugins/getplugs @@ -15,7 +15,7 @@ fi mkdir -p $PLUGIN_DIR cd $PLUGIN_DIR -wget -nv --show-progress https://github.com/jarun/nnn/archive/master.tar.gz +curl -Ls -O https://github.com/jarun/nnn/archive/master.tar.gz tar -xf master.tar.gz cp -vf nnn-master/plugins/* . sudo mv -vf nnn-master/misc/nlaunch/nlaunch /usr/local/bin/ diff --git a/plugins/upgrade b/plugins/upgrade index 83b9949f0824a3e46ab2db5d393d1ee0b8bf1ec2..8dd3b5a9cda2fa90af5479170eba42b6470f9bc1 100755 --- a/plugins/upgrade +++ b/plugins/upgrade @@ -15,7 +15,7 @@ exit 0 fi # get the package -wget "https://github.com/jarun/nnn/releases/download/v$new/nnn_$new-1_debian9.amd64.deb" +curl -Ls -O "https://github.com/jarun/nnn/releases/download/v$new/nnn_$new-1_debian9.amd64.deb" # install it sudo dpkg -i nnn_$new-1_debian9.amd64.deb