Krolyxon
Commit 348707a

Branches

Refs →

nsxivREADME.md

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