| 1 | sxiv: Simple (or small or suckless) X Image Viewer |
| 2 | |
| 3 | sxiv is an alternative to feh and qiv. Its only dependency besides xlib is |
| 4 | imlib2. The primary goal for writing sxiv is to create an image viewer, which |
| 5 | only has the most basic features required for fast image viewing (the ones I |
| 6 | want). It has vi key bindings and works nicely with tiling window managers. |
| 7 | Its code base should be kept small and clean to make it easy for you to dig |
| 8 | into it and customize it for your needs. |
| 9 | |
| 10 | Features |
| 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 | |
| 20 | Additional features, that need to be enabled at compile-time (in *config.h*): |
| 21 | |
| 22 | * Load all frames from GIF files and play GIF animations |
| 23 | * Auto-orientate JPEG images according to their EXIF tags |
| 24 | |
| 25 | Screenshots |
| 26 | ----------- |
| 27 | |
| 28 | Image mode: |
| 29 | |
| 30 | <img src="http://github.com/muennich/sxiv/raw/master/sample/image.png"> |
| 31 | |
| 32 | Thumbnail mode: |
| 33 | |
| 34 | <img src="http://github.com/muennich/sxiv/raw/master/sample/thumb.png"> |
| 35 | |
| 36 | Installation |
| 37 | ------------ |
| 38 | sxiv is built using the commands: |
| 39 | |
| 40 | $ make |
| 41 | # make install |
| 42 | |
| 43 | Please note, that the latter one requires root privileges. |
| 44 | By default, sxiv is installed using the prefix "/usr/local", so the full path |
| 45 | of the executable will be "/usr/local/bin/sxiv". |
| 46 | |
| 47 | You can install sxiv into a directory of your choice by changing the second |
| 48 | command to: |
| 49 | |
| 50 | # make PREFIX="/your/dir" install |
| 51 | |
| 52 | The build-time specific settings of sxiv can be found in the file *config.h*. |
| 53 | Please check and change them, so that they fit your needs. |
| 54 | |
| 55 | Usage |
| 56 | ----- |
| 57 | sxiv has two modes of operation: image and thumbnail mode. The default is |
| 58 | image mode, in which only the current image is shown. In thumbnail mode a grid |
| 59 | of small previews is displayed, making it easy to choose an image to open. |
| 60 | |
| 61 | sxiv supports the following command-line options: |
| 62 | |
| 63 | -c Remove all orphaned cache files from thumbnail cache and exit |
| 64 | -d Scale all images to 100%, but fit large images into window |
| 65 | -F Use size-hints to make the window fixed/floating |
| 66 | -f Start in fullscreen mode |
| 67 | -g GEOMETRY Set window position and size |
| 68 | (see section GEOMETRY SPECIFICATIONS of X(7)) |
| 69 | -n NUM Start at picture NUM |
| 70 | -p Pixelize, i.e. turn off image anti-aliasing |
| 71 | -q Be quiet, disable warnings |
| 72 | -r Search given directories recursively for images |
| 73 | -s Scale all images to fit into window |
| 74 | -t Start in thumbnail mode |
| 75 | -v Print version information and exit |
| 76 | -Z Same as `-z 100' |
| 77 | -z ZOOM Scale all images to current zoom level, use ZOOM at startup |
| 78 | |
| 79 | The following key mappings are available; differences between image view and |
| 80 | thumbnail mode are denoted via brackets: |
| 81 | |
| 82 | q Quit sxiv |
| 83 | Return Switch to thumbnail mode [open selected image] |
| 84 | |
| 85 | n,Space Go to the next image |
| 86 | p,Backspace Go to the previous image |
| 87 | g,G Go to [select] first/last image |
| 88 | [,] Go 10 images backward/forward |
| 89 | |
| 90 | Ctrl-n,p Go to the next/previous frame of a multi-frame image |
| 91 | Ctrl-Space Play/pause animation of a multi-frame image |
| 92 | |
| 93 | +,= Zoom in |
| 94 | - Zoom out |
| 95 | 0 Set zoom level to 100% |
| 96 | w Fit image into window |
| 97 | |
| 98 | h,j,k,l Pan image [move selection] left/down/up/right |
| 99 | (also with arrow keys) |
| 100 | H,J,K,L Pan to left/bottom/top/right image edge |
| 101 | Ctrl-h,j,k,l Pan image one window width/height left/down/up/right |
| 102 | (also with Ctrl-arrow keys) |
| 103 | |
| 104 | <,> Rotate image (counter-)clockwise by 90 degrees |
| 105 | |
| 106 | W Resize window to fit image |
| 107 | f Toggle fullscreen mode (requires an EWMH/NetWM compliant |
| 108 | window manager) |
| 109 | |
| 110 | a Toggle anti-aliasing |
| 111 | A Toggle visibility of alpha-channel, i.e. transparency |
| 112 | D Remove image from file list and go to [select] next image |
| 113 | r Reload image |
| 114 | |
| 115 | Additionally, the following mouse mappings are available: |
| 116 | |
| 117 | Button1 Go to the next image |
| 118 | [select image/open image if it is already selected] |
| 119 | Button2 Drag image with mouse while keeping it pressed |
| 120 | Button3 Go to the previous image |
| 121 | ScrollUp Pan image up [scroll up one thumbnail row] |
| 122 | ScrollDown Pan image down [scroll down one thumbnail row] |
| 123 | Shift+ScrollUp Pan image left |
| 124 | Shift+ScrollDown Pan image right |
| 125 | Ctrl+ScrollUp Zoom in |
| 126 | Ctrl+ScrollDown Zoom out |