Krolyxon
Commit 0f91d28

Branches

Refs →

nsxivREADME.md

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