aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorsomini <dev@somini.xyz>2020-12-03 00:37:42 +0000
committerHarry Jeffery <harry@exec64.co.uk>2021-07-08 23:30:24 +0100
commit9557a4b1129d1578cafc3edffc4e72fa007a8e2f (patch)
tree6bf0ace7a44ac7d8fe808d79e11d4a1ab718daf1 /contrib
parentb557c56d44839deb84c0c4ba86748b4dbb40171b (diff)
downloadimv-9557a4b1129d1578cafc3edffc4e72fa007a8e2f.tar.gz
Move imv-folder files to contrib
See #261
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/imv-folder10
-rw-r--r--contrib/imv-folder.1.txt36
-rw-r--r--contrib/imv-folder.desktop14
3 files changed, 60 insertions, 0 deletions
diff --git a/contrib/imv-folder b/contrib/imv-folder
new file mode 100755
index 0000000..33ea051
--- /dev/null
+++ b/contrib/imv-folder
@@ -0,0 +1,10 @@
+#!/bin/bash
+image="$1"
+declare -a ARGS order
+readarray -t -d '' order < <(printf '%s\0' "$(dirname "$image")"/* | sort -z --sort=version)
+for a in "${order[@]}"; do
+ if [ -f "$a" ]; then
+ ARGS+=("$a")
+ fi
+done
+exec imv "${ARGS[@]}" -n "$image"
diff --git a/contrib/imv-folder.1.txt b/contrib/imv-folder.1.txt
new file mode 100644
index 0000000..a9d627b
--- /dev/null
+++ b/contrib/imv-folder.1.txt
@@ -0,0 +1,36 @@
+/////
+vim:set ts=4 sw=4 tw=82 noet:
+/////
+:quotes.~:
+
+imv (1)
+=======
+
+Name
+----
+imv-folder - Open 'imv' for all images in a folder
+
+Description
+-----------
+
+'imv-folder' is a wrapper for 'imv' that auto-selects the folder where the image is located, so that the *next* and *previous* commands function in the same way as other image viewers.
+
+Note that this wrapper supports only a single image. For opening multiple images, use plain `imv`.
+
+Synopsis
+--------
+'imv-folder' path
+
+Authors
+-------
+
+imv is written and maintained by Harry Jeffery <me@harry.pm>
+with contributions from other developers.
+
+Full source code and other information can be found at
+<https://github.com/eXeC64/imv>.
+
+See Also
+--------
+
+**imv**(1)
diff --git a/contrib/imv-folder.desktop b/contrib/imv-folder.desktop
new file mode 100644
index 0000000..4bec770
--- /dev/null
+++ b/contrib/imv-folder.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Name=imv-folder
+Name[en_US]=imv
+GenericName=Image viewer
+GenericName[en_US]=Image viewer
+Comment=Fast freeimage-based Image Viewer | Open all images on a folder
+Exec=imv-folder %f
+NoDisplay=true
+Terminal=false
+Type=Application
+Categories=Graphics;2DGraphics;Viewer;
+MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;image/png;image/tiff;image/x-bmp;image/x-pcx;image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-tga;image/x-xbitmap;
+Icon=multimedia-photo-viewer
+Keywords=photo;picture;