Krolyxon
Commit 8f99adb

Branches

Refs →

nsxivREADME.md

153 lines · 5.9 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 need to change the first build
78command to:
79
80 $ make XFLAGS="-DGIF_SUPPORT -DEXIF_SUPPORT" XLIBS="-lgif -lexif"
81
82Usage
83=====
84sxiv has two modes of operation: image and thumbnail mode. The default is
85image mode, in which only the current image is shown. In thumbnail mode a grid
86of small previews is displayed, making it easy to choose an image to open.
87
88sxiv supports the following command-line options:
89
90 -c Remove all orphaned cache files from thumbnail cache and exit
91 -d Scale all images to 100%, but fit large images into window
92 -F Use size-hints to make the window fixed/floating
93 -f Start in fullscreen mode
94 -g GEOMETRY Set window position and size
95 (see section GEOMETRY SPECIFICATIONS of X(7))
96 -n NUM Start at picture NUM
97 -p Pixelize, i.e. turn off image anti-aliasing
98 -q Be quiet, disable warnings
99 -r Search given directories recursively for images
100 -s Scale all images to fit into window
101 -t Start in thumbnail mode
102 -v Print version information and exit
103 -Z Same as `-z 100'
104 -z ZOOM Scale all images to current zoom level, use ZOOM at startup
105
106The following key mappings are available; differences between image view and
107thumbnail mode are denoted via brackets:
108
109 q Quit sxiv
110 Return Switch to thumbnail mode [open selected image]
111
112 n,Space Go to the next image
113 p,Backspace Go to the previous image
114 g,G Go to [select] first/last image
115 [,] Go 10 images backward/forward
116
117 Ctrl-n,p Go to the next/previous frame of a multi-frame image
118 Ctrl-Space Play/pause animation of a multi-frame image
119
120 +,= Zoom in
121 - Zoom out
122 0 Set zoom level to 100%
123 w Fit image into window
124
125 h,j,k,l Pan image [move selection] left/down/up/right
126 (also with arrow keys)
127 H,J,K,L Pan to left/bottom/top/right image edge
128 Ctrl-h,j,k,l Pan image one window width/height left/down/up/right
129 (also with Ctrl-arrow keys)
130
131 <,> Rotate image (counter-)clockwise by 90 degrees
132
133 W Resize window to fit image
134 f Toggle fullscreen mode (requires an EWMH/NetWM compliant
135 window manager)
136
137 a Toggle anti-aliasing
138 A Toggle visibility of alpha-channel, i.e. transparency
139 D Remove image from file list and go to [select] next image
140 r Reload image
141
142Additionally, the following mouse mappings are available:
143
144 Button1 Go to the next image
145 [select image/open image if it is already selected]
146 Button2 Drag image with mouse while keeping it pressed
147 Button3 Go to the previous image
148 ScrollUp Pan image up [scroll up one thumbnail row]
149 ScrollDown Pan image down [scroll down one thumbnail row]
150 Shift+ScrollUp Pan image left
151 Shift+ScrollDown Pan image right
152 Ctrl+ScrollUp Zoom in
153 Ctrl+ScrollDown Zoom out