Krolyxon
Commit b2a2a62

Branches

Refs →

nsxivREADME.md

158 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 section
21*Installation* on 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 control which additional features (non-default
61compile-time features) should be enabled and included during compilation.
62
63The following table lists the available additional features--the column
64*Requires* indicates, which libraries need to be installed for a feature; the
65columns *XFLAGS* and *XLIBS* show, what needs to be added to these macros to
66enable the corresponding feature:
67
68 Feature | Requires | XFLAGS | XLIBS
69 ----------------------------------+----------+----------------+--------
70 GIF support: Load all frames and | giflib | -DGIF_SUPPORT | -lgif
71 play animations of GIF files | | |
72 ----------------------------------+----------+----------------+--------
73 EXIF support: auto-orientate JPEG | libexif | -DEXIF_SUPPORT | -lexif
74 files according to their EXIF tag | | |
75
76For instance, to enable GIF and EXIF support, the giflib and libexif libraries
77need to be installed on your system and you either need to change the first
78build command to:
79
80 $ make XFLAGS="-DGIF_SUPPORT -DEXIF_SUPPORT" XLIBS="-lgif -lexif"
81
82Or you need to run the following commands before building sxiv:
83
84 $ export XFLAGS="-DGIF_SUPPORT -DEXIF_SUPPORT"
85 $ export XLIBS="-lgif -lexif"
86
87Usage
88=====
89sxiv has two modes of operation: image and thumbnail mode. The default is
90image mode, in which only the current image is shown. In thumbnail mode a grid
91of small previews is displayed, making it easy to choose an image to open.
92
93sxiv supports the following command-line options:
94
95 -c Remove all orphaned cache files from thumbnail cache and exit
96 -d Scale all images to 100%, but fit large images into window
97 -F Use size-hints to make the window fixed/floating
98 -f Start in fullscreen mode
99 -g GEOMETRY Set window position and size
100 (see section GEOMETRY SPECIFICATIONS of X(7))
101 -n NUM Start at picture NUM
102 -p Pixelize, i.e. turn off image anti-aliasing
103 -q Be quiet, disable warnings
104 -r Search given directories recursively for images
105 -s Scale all images to fit into window
106 -t Start in thumbnail mode
107 -v Print version information and exit
108 -Z Same as `-z 100'
109 -z ZOOM Scale all images to current zoom level, use ZOOM at startup
110
111The following key mappings are available; differences between image view and
112thumbnail mode are denoted via brackets:
113
114 q Quit sxiv
115 Return Switch to thumbnail mode [open selected image]
116
117 n,Space Go to the next image
118 p,Backspace Go to the previous image
119 g,G Go to [select] first/last image
120 [,] Go 10 images backward/forward
121
122 Ctrl-n,p Go to the next/previous frame of a multi-frame image
123 Ctrl-Space Play/pause animation of a multi-frame image
124
125 +,= Zoom in
126 - Zoom out
127 0 Set zoom level to 100%
128 w Fit image into window
129
130 h,j,k,l Pan image [move selection] left/down/up/right
131 (also with arrow keys)
132 H,J,K,L Pan to left/bottom/top/right image edge
133 Ctrl-h,j,k,l Pan image one window width/height left/down/up/right
134 (also with Ctrl-arrow keys)
135
136 <,> Rotate image (counter-)clockwise by 90 degrees
137
138 W Resize window to fit image
139 f Toggle fullscreen mode (requires an EWMH/NetWM compliant
140 window manager)
141
142 a Toggle anti-aliasing
143 A Toggle visibility of alpha-channel, i.e. transparency
144 D Remove image from file list and go to [select] next image
145 r Reload image
146
147Additionally, the following mouse mappings are available:
148
149 Button1 Go to the next image
150 [select image/open image if it is already selected]
151 Button2 Drag image with mouse while keeping it pressed
152 Button3 Go to the previous image
153 ScrollUp Pan image up [scroll up one thumbnail row]
154 ScrollDown Pan image down [scroll down one thumbnail row]
155 Shift+ScrollUp Pan image left
156 Shift+ScrollDown Pan image right
157 Ctrl+ScrollUp Zoom in
158 Ctrl+ScrollDown Zoom out