When comparing sxiv vs pqiv, the Slant community recommends sxiv for most people. In the question“What are the best small and lightweight image viewers for UNIX-like systems?” sxiv is ranked 6th while pqiv is ranked 8th. The most important reason people chose sxiv is:
Anti-aliasing is usually enabled on startup and can be toggled with 'a'. Disabling anti-aliasing means faster operation due to less CPU load. Changing the default is possible by compiling with this setting: # config.h static const bool ANTI_ALIAS = false;
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Anti-aliasing can be toggled
Anti-aliasing is usually enabled on startup and can be toggled with 'a'.
Disabling anti-aliasing means faster operation due to less CPU load.
Changing the default is possible by compiling with this setting:
# config.h
static const bool ANTI_ALIAS = false;
Pro Supports embedding into other X windows
Via option -e.
Pro Basic support for multi-frame images (aka animations)
Load all frames from GIF files and play GIF animations.
Pro Acts as a filter for images that interacts with the command line
Option -i (input) takes filenames from stdinput and outputs marked images to stdoutput via option -o (output).
Pro Userscripts can be applied to single images or thumbnail mode selection
Examples of how to use the key-handler are found here:
/usr/share/sxiv/exec/key-handler
Pro Image infobox can be configured
Can be configured in ~/.config/sxiv/exec/image-info. See also here.
Pro Rudimentary viewing manipulation
Images can be rotated (<,>), flipped (|,_) and scaled (w,W,e,E,=).
Pro View mode with marked files
Keys 'N' and 'P' move in list of marked files. This can be useful.
Pro Thumbnail mode
Pro Fast
Pro Configuration via command line flags or configuration file
Configuration based on one file (~/.config/pqivrc).
See manual page:
"
[options]
fullscreen=1
sort=1
command-1=|convert - -blur 20 -
...
[keybindings]
q { goto_file_relative(-1); }
w { goto_file_relative(1); }
Similarly, you can also specify (multiple) actions to be executed each time pqiv is started in a section called [actions].
"
Pro Has a jump mode in thumbnail mode (montage mode) thats similar to vim-easymotion
See "montage_mode_follow(KEYS)" in the man page.
By default g activates jump mode.
Pro Can pipe images through external filters
Pro VIM-like key sequences, action cycling and binding multiple actions to a single key
Pro Keys are easily configured to a user command.
Keys can even be configured on the command line.
Pro Powerful collection of so called actions
Actions can be used to configure the interaction with the program (e.g. moving, file selection, view manipulation, UI appearance, simple image manipulation).
Actions can easily be used in the configuration.
Pro Rudimentary viewing manipulation
h/v: Flip the image horizontally or vertically.
k/l: Rotate the image right or left.
Plus/Minus: Zoom.
Pro Comes with transparency support
Pro Can watch files and directories for changes
Pro Quick jump dialog based on filename mask
j: Show a dialog with a list of all files for quick selection.
Pro Has infobox out of the box
Cons
Con Browsing a directory after opening a single file needs fixing
See here
There is a workaround implemented in ranger that works more or less out of the box
# This hook allows image viewers to open all images in the current
# directory, keeping the order of files the same as in ranger.
# The requirements to use it are:
# 1. set open_all_images to true
# 2. ensure no files are marked
# 3. call rifle with a command that starts with "sxiv " or "feh "
def sxiv_workaround_hook(command):
Con Jumping in thumbnail mode possible, but limited
By entering a number, followed by capital G the focus jumps to that image in the list counted from beginning. (G is default key for 'g_n_or_last'-action (see config.h in source).)
It has to be noted that prefixing a motion with a number also works as espected (vim style).
Alas, a jumping mode with lables (like with pqiv) would be an advantage.
Con It doesn't have pong
Con Thumbnail mode only with simple marking
Key 'm' marks files.
Con Keys not configurable except via keyhandler mode or compilation
Keys can be associated with userscripts, which can be defined in ~/.config/sxiv/exec/key-handler. Every associated button needs to be prefixed with the key combination C-x (although that prefix can be configured to another key or key combination in config.h).
It has to be noted that key configuration apart from the key-handler is possible via compilation (Customizable key and mouse button mappings in config.h), which must not be a bad way to configure buttons, but certainly means a barrier for the not so tech-savvy.
Easy instruction for compilation:
1) Enter in terminal: "git clone https://github.com/muennich/sxiv.git"
2) Edit file "config.h" according to this
3) Compile and install, namely enter directory and enter in terminal: "make && sudo make install" (beware of sudo/root unless you know what you do)
( 4) Iterate: 2), then: enter directory and enter in terminal: "make clean && make && sudo make install" )
See an example for remapping the navigation buttons:
// navigate thumbnail+image
{ 0, XK_Left, i_navigate, -1 },
{ 0, XK_Left, t_move_sel, DIR_LEFT },
{ 0, XK_Right, i_navigate, +1 },
{ 0, XK_Right, t_move_sel, DIR_RIGHT },
{ 0, XK_Down, t_move_sel, DIR_DOWN },
{ 0, XK_Up, t_move_sel, DIR_UP },
{ ShiftMask, XK_Right, i_navigate, +10 },
{ ShiftMask, XK_Left, i_navigate, -10 },
Con Browsing a directory after opening a single file needs user intervention
Con Slow display
Going through a list of images is not as fast as e.g. with sxiv.
Con No selection of (multiple) files
Thumbnail mode hasn't any means of marking files.
Con Thumbnail creation extremely slow
Thumbnail mode is called "montage mode" (key m).
Con Only background color of infobox can be configured
Con It doesn't have pong
Alternative Products
