From 796074b541aaca459c594fe517c11d275778eef6 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 6 Aug 2012 06:32:04 +0200 Subject: added the examples from the man page to the examples directory I guess a whole directory for examples scales better than having them in the man page. --- doc/sxivall.sh | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100755 doc/sxivall.sh (limited to 'doc/sxivall.sh') diff --git a/doc/sxivall.sh b/doc/sxivall.sh deleted file mode 100755 index 228114ce..00000000 --- a/doc/sxivall.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -# -# This script searches image files in a directory, opens them all with sxiv -# and sets the first argument to the first image displayed by sxiv. -# -# This is supposed to be used in rifle.conf as a workaround for the fact that -# sxiv takes no file name arguments for the first image, just the number. -# Copy this file somewhere into your $PATH and add this at the top of rifle.conf: -# -# mime ^image, has sxiv, X, flag f = sxivall.sh -- "$@" -# - -[ "$1" == '--' ] && shift -target="$(realpath -s "$1")" -function listfiles { - find "$(dirname "$target")" -maxdepth 1 -type f -iregex '.*\(jpe?g\|bmp\|png\|gif\)$' -print0 | sort -z -} - -count="$(listfiles | grep -m 1 -Zznx "$target" | cut -d: -f1)" - -if [ -n "$count" ]; then - listfiles | xargs -0 sxiv -n "$count" -- -else - sxiv -- "$@" # fallback -fi -- cgit 1.4.1-2-gfad0