Commit e6a53509 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Merge branch 'ulteq-natural-sort'

parents 8eaa3923 5a2db8f2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ Available flags are:
| exif | 0 | Builtin EXIF tag display support |
| help | 0 | include help text (refers to the manpage otherwise) |
| stat64 | 0 | Support CIFS shares from 64bit hosts on 32bit machines |
| verscmp | 1 | Support naturing sorting (`--version-sort`). Requires a GNU-compatible libc exposing `strverscmp` |
| xinerama | 1 | Support Xinerama/XRandR multiscreen setups |

So, by default **libcurl** and **Xinerama** are enabled, the rest is disabled.
+9 −1
Original line number Diff line number Diff line
@@ -5,9 +5,10 @@ app ?= 0
cam ?= 0
curl ?= 1
debug ?= 0
exif ?= 0
help ?= 0
verscmp ?= 1
xinerama ?= 1
exif ?= 0

# Prefix for all installed files
PREFIX ?= /usr/local
@@ -63,6 +64,13 @@ ifeq (${stat64},1)
	CFLAGS += -D_FILE_OFFSET_BITS=64
endif

ifeq (${verscmp},1)
	CFLAGS += -DHAVE_VERSCMP
	MAN_VERSCMP = enabled
else
	MAN_VERSCMP = disabled
endif

ifeq (${xinerama},1)
	CFLAGS += -DHAVE_LIBXINERAMA
	LDLIBS += -lXinerama
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ all: ${TARGETS}
	-e 's/\$$MAN_CURL\$$/${MAN_CURL}/' \
	-e 's/\$$MAN_DEBUG\$$/${MAN_DEBUG}/' \
	-e 's/\$$MAN_EXIF\$$/${MAN_EXIF}/' \
	-e 's/\$$MAN_VERSCMP\$$/${MAN_VERSCMP}/' \
	-e 's/\$$MAN_XINERAMA\$$/${MAN_XINERAMA}/' \
	< ${@:.1=.pre} > $@

+24 −9
Original line number Diff line number Diff line
@@ -24,7 +24,8 @@ $VERSION$
.
.Pp
.
Compile-time switches: libcurl support $MAN_CURL$, Xinerama support
Compile-time switches: libcurl support $MAN_CURL$, natural sorting support
$MAN_VERSCMP$, Xinerama support
$MAN_XINERAMA$, builtin EXIF support $MAN_EXIF$$MAN_DEBUG$
.
.
@@ -194,7 +195,7 @@ Extra actions which can be set and triggered using the appropriate number key.
.
.It Cm --auto-rotate
.
.Pq only if compiled with exif=1
.Pq optional feature, $MAN_EXIF$ in this build
Automatically rotate images based on EXIF data. Does not alter the image files.
.
.It Cm -Z , --auto-zoom
@@ -253,7 +254,7 @@ Draw the defined actions and what they do at the top-left of the image.
.
.It Cm --draw-exif
.
.Pq only if compiled with exif=1
.Pq optional feature, $MAN_EXIF$ in this build
display some EXIF information in the bottom left corner, similar to using
.Cm --info
with exiv2 / exifgrep .
@@ -514,8 +515,8 @@ managers.
.
.It Cm --no-xinerama
.
Disable Xinerama support.  Only makes sense when you have Xinerama support
compiled in.
.Pq optional feature, $MAN_XINERAMA$ in this build
Disable Xinerama support.
.
.It Cm -j , --output-dir Ar directory
.
@@ -696,8 +697,18 @@ output useful information, progress bars, etc.
.
output version information and exit.
.
.It Cm --version-sort
.
.Pq optional feature, $MAN_VERSCMP$ in this build
Use natural sorting for file and directory names. In this mode, filenames are
sorted as an ordinary human would expect, e.g.
.Qq 2.jpg
comes before
.Qq 10.jpg .
.
.It Cm --xinerama-index Ar screen
.
.Pq optional feature, $MAN_XINERAMA$ in this build
Override
.Nm Ns No 's
idea of the active Xinerama screen. May be useful in certain circumstances
@@ -1282,7 +1293,7 @@ Toggle filename display
.
.It e Bq toggle_exif
.
.Pq only if compiled with exif=1
.Pq optional feature, $MAN_EXIF$ in this build
Toggle EXIF tag display
.
.It f Bq save_filelist
@@ -1695,10 +1706,14 @@ Show all images in ~/Pictures
.
Recursively show all images found in ~/Pictures and subdirectories
.
.It feh -rSfilename ~/Pictures
.It feh -rSfilename --version-sort ~/Pictures
.
Same as above, but sort by filename. By default, feh will show files in the
order it finds them on the hard disk, which is usually somewhat random.
Same as above, but sort naturally. By default, feh will show files in the
string order of their names, meaning e.g.
.Qq foo 10.jpg
will come before
.Qq foo 2.jpg .
In this case, they are instead ordered as a human would expect.
.
.It feh -t -Sfilename -E 128 -y 128 -W 1024 ~/Pictures
.
+8 −0
Original line number Diff line number Diff line
@@ -27,6 +27,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef FEH_H
#define FEH_H

/*
 * strverscmp(3) is a GNU extension. In most supporting C libraries it
 * requires _GNU_SOURCE to be defined.
 */
#ifdef HAVE_VERSCMP
#define _GNU_SOURCE
#endif

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
Loading