Krolyxon
Commit 32a6520

Branches

Refs →

nsxivREADME.md

146 lines · 5.2 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
33Thumbnail mode:
34
35 <img src="http://github.com/muennich/sxiv/raw/master/sample/thumb.png">
36
37Installation
38============
39sxiv is built using the commands:
40
41 $ make
42 # make install
43
44Please note, that the latter one requires root privileges.
45By default, sxiv is installed using the prefix "/usr/local", so the full path
46of the executable will be "/usr/local/bin/sxiv".
47
48You can install it into a directory of your choice by changing the second
49command to:
50
51 # make PREFIX="/your/dir" install
52
53All build-time specific settings can be found in the file *config.h*. Please
54check and change them, so that they fit your needs.
55
56Additional features
57-------------------
58
59The XFLAGS and XLIBS macros control which additional features (non-default
60compile-time features) should be enabled and included during compilation.
61
62* GIF support:
63
64 XFLAGS=-DGIF_SUPPORT, XLIBS=-lgif, requires: giflib
65
66* EXIF support:
67
68 XFLAGS=-DEXIF_SUPPORT, XLIBS=-lexif, requires: libexif
69
70To enable GIF and EXIF support, the giflib and libexif libraries need to be
71installed on your system and you need to change the first build command to:
72
73 $ make XFLAGS="-DGIF_SUPPORT -DEXIF_SUPPORT" XLIBS="-lgif -lexif"
74
75Usage
76=====
77sxiv has two modes of operation: image and thumbnail mode. The default is
78image mode, in which only the current image is shown. In thumbnail mode a grid
79of small 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