sxiv
View images quickly and simply
TLDR
Open an image
Open an image in fullscreen mode
Open a newline-separated list of images, reading filenames from stdin
Open one or more images as a slideshow
Open one or more images in thumbnail mode
SYNOPSIS
sxiv [-bfgqrtzDNeovV] [-G GEOMETRY] [-s SCALE] [-S STATUS] [-Z ZOOM] [-W WINDOWID] [-b COMMAND] [-e COMMAND] [-p PATH] [-q QUALITY] [-t THUMBSIZE] [--] [FILE...]
sxiv is typically invoked by providing one or more image files as arguments. If directories are provided, sxiv will display all image files within them.
PARAMETERS
-b COMMAND
Execute COMMAND after loading an image.
-f
Start in fullscreen mode.
-g GEOMETRY
Set initial window position and size using X geometry string (e.g., "800x600+50+50").
-q
Suppress status bar output.
-r
Recurse into subdirectories when displaying image files.
-t
Start in thumbnail mode.
-z PERCENT
Set initial zoom level to PERCENT.
-D
Start in daemon mode. This allows other tools like sxiv-thumbnail to interact with a running sxiv instance.
-N
No normal window; implies -D. Useful for scripting.
-o
Print the absolute paths of selected files (in thumbnail mode) to standard output and exit.
-e COMMAND
Execute COMMAND on selected files (in thumbnail mode) before exiting. The selected file paths are passed as arguments to COMMAND.
-v
Print version information to standard output and exit.
DESCRIPTION
sxiv (simple X image viewer) is a lightweight and highly efficient image viewer for the X Window System. True to the suckless.org philosophy, it prioritizes minimalism, speed, and keyboard-driven interaction over feature bloat. It provides a clean, borderless display of images, supporting various popular formats through standard X libraries. Users familiar with Vim will find its navigation and command shortcuts intuitive, allowing for quick browsing, zooming, and rotation without ever touching a mouse. Its unique thumbnail mode facilitates easy directory navigation, and its extensibility via external scripts (through its daemon mode) makes it a powerful tool for custom workflows, despite its apparent simplicity. sxiv is ideal for users who value performance and a keyboard-centric workflow.
CAVEATS
sxiv is built for minimalism and efficiency, which means it consciously omits features found in more bloated image viewers. It lacks graphical menus, advanced image manipulation tools, or a plugin system beyond its external command execution. Its entirely keyboard-driven interface can present a steep learning curve for users unfamiliar with Vim-like keybindings. As an X application, it is not suitable for framebuffer-only environments (e.g., Linux console without X). Configuration is primarily done by editing its config.h source file and recompiling, which might be a barrier for some users.
KEYBINDINGS
sxiv is operated almost entirely via keyboard shortcuts, often inspired by Vim. Some common examples include:
h, j, k, l (or arrow keys): Navigate left, down, up, right in thumbnail mode.
n, p: Next and previous image.
+, -: Zoom in/out.
r: Rotate image clockwise.
f: Toggle fullscreen.
q: Quit.
g: Go to the first image.
G: Go to the last image.
t: Toggle thumbnail mode.
m: Mark/unmark image in thumbnail mode for selection.
d: Delete current image.
A comprehensive list of keybindings can be found in the sxiv man page or its source code's config.h.
SCRIPTING AND EXTERNAL COMMANDS
One of sxiv's powerful features is its ability to integrate with external scripts. The -o and -e options allow users to select images in thumbnail mode and then output their paths or execute a custom command on them, respectively. Additionally, the daemon mode (-D) enables advanced use cases where an external script can control a running sxiv instance, for example, to display images from a shell script or manage image collections dynamically.
HISTORY
sxiv was created by Anselm R. Garbe, a prominent developer associated with the suckless.org community. The suckless philosophy emphasizes simplicity, clarity, and frugality in software design, often resulting in small, fast, and secure programs that do one thing well. sxiv embodies this spirit, providing a no-frills, highly efficient image viewing experience. Its development has focused on maintaining a minimal codebase while offering robust core functionality, making it a popular choice among users who prefer a streamlined, Unix-like approach to their desktop tools.