aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-07-12 00:03:10 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-07-12 00:16:07 +0530
commitca714eac9067a44e5e0a7136dc6077969dd961ca (patch)
treead06038f69e6461337fb9c445c0dada6f5ed059b /plugins
parent406faf63d953a582f0241398c05ef55333fb034a (diff)
downloadnnn-ca714eac9067a44e5e0a7136dc6077969dd961ca.tar.gz
Show image thumbnails with lsix
Diffstat (limited to 'plugins')
-rw-r--r--plugins/README.md1
-rwxr-xr-xplugins/thumb17
2 files changed, 18 insertions, 0 deletions
diff --git a/plugins/README.md b/plugins/README.md
index 084ac2b..10b7830 100644
--- a/plugins/README.md
+++ b/plugins/README.md
@@ -26,6 +26,7 @@ The currently available plugins are listed below.
| ringtone | sh | date, ffmpeg | Create a variable bitrate mp3 ringtone from file |
| splitjoin | sh | split, cat | Split file or join selection |
| sxiv | sh | sxiv | Browse images in a dir in sxiv, 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 to latest nnn version manually on Debian 9 Stretch |
| viuimg | sh | [viu](https://github.com/atanunq/viu), less | View an image or images in a directory |
diff --git a/plugins/thumb b/plugins/thumb
new file mode 100755
index 0000000..10bb651
--- /dev/null
+++ b/plugins/thumb
@@ -0,0 +1,17 @@
+#!/usr/bin/env sh
+
+# Description: View thumbnail of an image or a directory of images with lsix
+#
+# Shell: POSIX compliant
+# Author: Arun Prakash Jana
+
+if ! [ -z "$1" ]; then
+ if [ -d "$1" ]; then
+ lsix "$1"/*
+ else
+ lsix "$1"
+ fi
+
+ echo -n "Press any key to exit..."
+ read dummy
+fi