Krolyxon
Commit 6e575b0

Branches

Refs →

nsxivREADME.md

159 lines · 6.0 KB · Markdown

1sxiv: Simple (or small or suckless) X Image Viewer
2
3sxiv is an alternative to feh and qiv. Its only dependency besides xlib is
4imlib2. The primary goal for writing sxiv is to create an image viewer, which
5only has the most basic features required for fast image viewing (the ones I
6want). It has vi key bindings and works nicely with tiling window managers.
7Its code base should be kept small and clean to make it easy for you to dig
8into it and customize it for your needs.
9
10Features
11========
12
13* Basic image operations, e.g. zooming, panning, rotating
14* Customizable key and mouse button mappings (in *config.h*)
15* Thumbnail mode: grid of selectable previews of all images
16* Ability to cache thumbnails for fast re-loading
17* Basic support for multi-frame images
18* Display image information in window title
19
20Additional features, that need to be included at compile-time--see next section
21on how to enable them:
22
23* Play GIF animations
24* Auto-orientate JPEG images according to their EXIF tags
25
26Screenshots
27===========
28
29Image mode:
30
31 <img src="http://github.com/muennich/sxiv/raw/master/sample/image.png">
32
33
34Thumbnail mode:
35
36 <img src="http://github.com/muennich/sxiv/raw/master/sample/thumb.png">
37
38Installation
39============
40sxiv is built using the commands:
41
42 $ make
43 # make install
44
45Please note, that the latter one requires root privileges.
46By default, sxiv is installed using the prefix "/usr/local", so the full path
47of the executable will be "/usr/local/bin/sxiv".
48
49You can install it into a directory of your choice by changing the second
50command to:
51
52 # make PREFIX="/your/dir" install
53
54All build-time specific settings can be found in the file *config.h*. Please
55check and change them, so that they fit your needs.
56
57Additional features
58-------------------
59
60The XFLAGS and XLIBS macros/environment variables control which additional
61features (i.e. non-default compile-time features) should be enabled and
62included during compilation.
63
64The following table lists the available additional features--the column
65*Requires* indicates, which libraries need to be installed for a feature; the
66columns *XFLAGS* and *XLIBS* show, what needs to be added to these
67macros/environment variables to enable the corresponding feature:
68
69 Feature | Requires | XFLAGS | XLIBS
70 ----------------------------------+----------+----------------+--------
71 GIF support: Load all frames and | giflib | -DGIF_SUPPORT | -lgif
72 play animations of GIF files | | |
73 ----------------------------------+----------+----------------+--------
74 EXIF support: auto-orientate JPEG | libexif | -DEXIF_SUPPORT | -lexif
75 files according to their EXIF tag | | |
76
77For instance, to enable GIF and EXIF support, the giflib and libexif libraries
78need to be installed on your system and you either need to change the first
79build command to:
80
81 $ make XFLAGS="-DGIF_SUPPORT -DEXIF_SUPPORT" XLIBS="-lgif -lexif"
82
83Or you need to run the following commands before building sxiv:
84
85 $ export XFLAGS="-DGIF_SUPPORT -DEXIF_SUPPORT"
86 $ export XLIBS="-lgif -lexif"
87
88Usage
89=====
90sxiv has two modes of operation: image and thumbnail mode. The default is image
91mode, in which only the current image is shown. In thumbnail mode a grid of
92small previews is displayed, making it easy to choose an image to open.
93
94sxiv supports the following command-line options:
95
96 -c Remove all orphaned cache files from thumbnail cache and exit
97 -d Scale all images to 100%, but fit large images into window
98 -F Use size-hints to make the window fixed/floating
99 -f Start in fullscreen mode
100 -g GEOMETRY Set window position and size
101 (see section GEOMETRY SPECIFICATIONS of X(7))
102 -n NUM Start at picture NUM
103 -p Pixelize, i.e. turn off image anti-aliasing
104 -q Be quiet, disable warnings
105 -r Search given directories recursively for images
106 -s Scale all images to fit into window
107 -t Start in thumbnail mode
108 -v Print version information and exit
109 -Z Same as `-z 100'
110 -z ZOOM Scale all images to current zoom level, use ZOOM at startup
111
112The following key mappings are available; differences between image view and
113thumbnail mode are denoted via brackets:
114
115 q Quit sxiv
116 Return Switch to thumbnail mode [open selected image]
117
118 n,Space Go to the next image
119 p,Backspace Go to the previous image
120 g,G Go to [select] first/last image
121 [,] Go 10 images backward/forward
122
123 Ctrl-n,p Go to the next/previous frame of a multi-frame image
124 Ctrl-Space Play/pause animation of a multi-frame image
125
126 +,= Zoom in
127 - Zoom out
128 0 Set zoom level to 100%
129 w Fit image into window
130
131 h,j,k,l Pan image [move selection] left/down/up/right
132 (also with arrow keys)
133 H,J,K,L Pan to left/bottom/top/right image edge
134 Ctrl-h,j,k,l Pan image one window width/height left/down/up/right
135 (also with Ctrl-arrow keys)
136
137 <,> Rotate image (counter-)clockwise by 90 degrees
138
139 W Resize window to fit image
140 f Toggle fullscreen mode (requires an EWMH/NetWM compliant
141 window manager)
142
143 a Toggle anti-aliasing
144 A Toggle visibility of alpha-channel, i.e. transparency
145 D Remove image from file list and go to [select] next image
146 r Reload image
147
148Additionally, the following mouse mappings are available:
149
150 Button1 Go to the next image
151 [select image/open image if it is already selected]
152 Button2 Drag image with mouse while keeping it pressed
153 Button3 Go to the previous image
154 ScrollUp Pan image up [scroll up one thumbnail row]
155 ScrollDown Pan image down [scroll down one thumbnail row]
156 Shift+ScrollUp Pan image left
157 Shift+ScrollDown Pan image right
158 Ctrl+ScrollUp Zoom in
159 Ctrl+ScrollDown Zoom out