nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 650f92bf346d9183da47f79e33ec331cb0150386
parent 9ba3cb3e9b426b72b14e6c616fdb35828e4b9f7c
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Sat,  1 Jun 2019 00:59:59 +0530

Add plugin to view image and browse image dir

Diffstat:
Mplugins/README.md | 1+
Aplugins/viuimg | 14++++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/plugins/README.md b/plugins/README.md @@ -19,6 +19,7 @@ | 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))| | transfer | sh | curl | Upload current 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 | #### Installing plugins diff --git a/plugins/viuimg b/plugins/viuimg @@ -0,0 +1,14 @@ +#!/usr/bin/env sh + +# Description: View an image or images in a directory in pager +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +if ! [ -z "$1" ]; then + if [ -d "$1" ]; then + viu -n "$1"/* 2>/dev/null | less -R + else + viu -n "$1" | less -R + fi +fi