| 1 | sxiv: Simple (or small or suckless) X Image Viewer |
| 2 | |
| 3 | sxiv is an alternative to feh and qiv. Its only dependencies besides xlib are |
| 4 | imlib2 and giflib. The primary goal for writing sxiv is to create an image |
| 5 | viewer, which only has the most basic features required for fast image viewing |
| 6 | (the ones I want). It has vi key bindings and works nicely with tiling window |
| 7 | managers. Its code base should be kept small and clean to make it easy for you |
| 8 | to dig 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 | * Load all frames from GIF files and play GIF animations |
| 19 | * Display image information in window title |
| 20 | |
| 21 | Screenshots |
| 22 | ----------- |
| 23 | |
| 24 | Image mode: |
| 25 | |
| 26 | <img src="http://github.com/muennich/sxiv/raw/master/sample/image.png"> |
| 27 | |
| 28 | Thumbnail mode: |
| 29 | |
| 30 | <img src="http://github.com/muennich/sxiv/raw/master/sample/thumb.png"> |
| 31 | |
| 32 | Installation |
| 33 | ------------ |
| 34 | sxiv is built using the commands: |
| 35 | |
| 36 | $ make |
| 37 | # make install |
| 38 | |
| 39 | Please note, that the latter one requires root privileges. |
| 40 | By default, sxiv is installed using the prefix "/usr/local", so the full path |
| 41 | of the executable will be "/usr/local/bin/sxiv". |
| 42 | |
| 43 | You can install sxiv into a directory of your choice by changing the second |
| 44 | command to: |
| 45 | |
| 46 | # make PREFIX="/your/dir" install |
| 47 | |
| 48 | The build-time specific settings of sxiv can be found in the file *config.h*. |
| 49 | Please check and change them, so that they fit your needs. |
| 50 | If the file *config.h* does not already exist, then you have to create it with |
| 51 | the following command: |
| 52 | |
| 53 | $ make config.h |
| 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 | -b Do not show info bar on bottom of window |
| 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 | |
| 80 | The following general key commands are available: |
| 81 | |
| 82 | q Quit sxiv |
| 83 | Return Switch to thumbnail mode / open selected image |
| 84 | |
| 85 | 0-9 Prefix the next command with a number (denoted via [count]) |
| 86 | |
| 87 | g Go to first image |
| 88 | G Go to the last image, or image number [count] |
| 89 | |
| 90 | f Toggle fullscreen mode (requires an EWMH/NetWM compliant |
| 91 | window manager) |
| 92 | b Toggle visibility of info bar on bottom of window |
| 93 | A Toggle visibility of alpha-channel, i.e. transparency |
| 94 | |
| 95 | r Reload image |
| 96 | R Reload all thumbnails |
| 97 | D Remove image from file list and go to next image |
| 98 | |
| 99 | |
| 100 | The following additional key commands are available in *thumbnail mode*: |
| 101 | |
| 102 | h,j,k,l Move selection left/down/up/right [count] times |
| 103 | Ctrl-j,k Scroll thumbnail grid one window height down/up |
| 104 | |
| 105 | The following additional key commands are available in *image mode*: |
| 106 | |
| 107 | n,Space Go [count] images forward |
| 108 | p,Backspace Go [count] images backward |
| 109 | [,] Go [count] * 10 images backward/forward |
| 110 | |
| 111 | Ctrl-n,p Go to the next/previous frame of a multi-frame image |
| 112 | Ctrl-Space Play/pause animation of a multi-frame image |
| 113 | |
| 114 | + Zoom in |
| 115 | - Zoom out |
| 116 | = Set zoom level to 100%, or [count]% |
| 117 | w Fit image into window |
| 118 | e Fit image to window's width |
| 119 | E Fit image to window's height |
| 120 | |
| 121 | h,j,k,l Pan image 1/5 of window width/height or [count] pixels |
| 122 | left/down/up/right (also with arrow keys) |
| 123 | H,J,K,L Pan to left/bottom/top/right image edge |
| 124 | Ctrl-h,j,k,l Pan image one window width/height left/down/up/right |
| 125 | (also with Ctrl-arrow keys) |
| 126 | |
| 127 | <,> Rotate image (counter-)clockwise by 90 degrees |
| 128 | \,| Flip image horizontally/vertically |
| 129 | |
| 130 | s Toggle slideshow |
| 131 | Ctrl-'-' Decrease slideshow delay |
| 132 | Ctrl-'+' Increase slideshow delay |
| 133 | Ctrl-'=' Reset slideshow delay, or set it to [count] seconds |
| 134 | |
| 135 | a Toggle anti-aliasing |
| 136 | W Resize window to fit image |
| 137 | |
| 138 | Additionally, the following mouse commands are available in *image mode*: |
| 139 | |
| 140 | Button1 Go to the next image |
| 141 | Button2 Drag image with mouse while keeping it pressed |
| 142 | Button3 Go to the previous image |
| 143 | Scroll Pan image up/down |
| 144 | Shift+Scroll Pan image left/right |
| 145 | Ctrl+Scroll Zoom in/out |