SXIV(1)

πŸ“¦
version 26 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing

πŸ’– SXIV β€” the manual page, but make it make sense πŸ’–

okay bestie, welcome to the sxiv manual page β€” that's Simple X Image Viewer, from the General Commands Manual, section 1. it's a whole vibe. let's get into it. πŸ¦‹


✨ NAME ✨

sxiv β€” Simple X Image Viewer

like. it views images. on X. that's the whole thing. πŸ’…


🌸 SYNOPSIS 🌸

sxiv [-abcfhiopqrtvZ] [-A FRAMERATE] [-e WID] [-G GAMMA] [-g GEOMETRY]
[-N NAME] [-n NUM] [-S DELAY] [-s MODE] [-z ZOOM] FILE...

yes, that's a lot of little flags. no, we're not scared of them. keep reading. 🫢


πŸ‘‘ DESCRIPTION πŸ‘‘

sxiv is a simple image viewer for X.

it has two modes of operation: image mode and thumbnail mode. the default is image mode, in which only the current image is shown. in thumbnail mode a grid of small previews is displayed, making it easy to choose an image to open. literally the thumbnail mode is the main character of picking which pic you want. πŸ”₯

πŸ’€ please note: fullscreen mode requires an EWMH/NetWM compliant window manager. no compliant WM, no fullscreen. that's just the rules bestie.

πŸ’… OPTIONS πŸ’…

  • -A FRAMERATE β€” play animations with a constant frame rate set to FRAMERATE. steady beats only. πŸŽ€
  • -a β€” play animations of multi-frame images. yes the gif WILL move.
  • -b β€” do not show info bar on bottom of window. bye bar. πŸ’¨
  • -c β€” remove all orphaned cache files from the thumbnail cache directory and exit. cleanup era. ✨
  • -e WID β€” embed sxiv's window into window whose ID is WID. nesting doll behavior. πŸͺ†
  • -f β€” start in fullscreen mode. immersive. 🌈
  • -G GAMMA β€” set image gamma to GAMMA (-32..32). tiny numbers, big mood swings.
  • -g GEOMETRY β€” set window position and size. see section GEOMETRY SPECIFICATIONS of X(7) for more information on GEOMETRY argument. iykyk.
  • -N NAME β€” set the resource name of sxiv's X window to NAME. naming your child. 🍼
  • -n NUM β€” start at picture number NUM. skip to your fav, no shame.
  • -h β€” print brief usage information to standard output and exit. help me help you. πŸ™ˆ
  • -i β€” read names of files to open from standard input. also done if FILE is -. pipes girlies rise 🫢
  • -o β€” write list of all marked files to standard output when quitting. in combination with -i sxiv can be used as a visual filter/pipe. that's the collab of the century ngl.
  • -p β€” enable private mode, in which sxiv does not write any cache or temporary files. ghost mode. no traces. πŸ‘»
  • -q β€” be quiet, disable warnings to standard error stream. shhh. 🀫
  • -r β€” search the given directories recursively for images to view. dig deep bestie.
  • -S DELAY β€” start in slideshow mode. set the delay between images to DELAY seconds. DELAY may be a floating point number. (yes, 1.5 is valid, we love a fractional queen. πŸ“)
  • -s MODE β€” set scale mode according to MODE character. supported modes are: [d]own, [f]it, [w]idth, [h]eight.
  • -t β€” start in thumbnail mode. grid supremacy. πŸ”²
  • -v β€” print version information to standard output and exit. who am i? πŸ’–
  • -Z β€” the same as -z 100. shortcut slay.
  • -z ZOOM β€” set zoom level to ZOOM percent. get up close and personal. πŸ”

⌨️ KEYBOARD COMMANDS ⌨️

🌟 General

the following keyboard commands are available in both image and thumbnail mode:

  • 0-9 β€” prefix the next command with a number (denoted via count). the count girlies stay winning.
  • q β€” quit sxiv.
  • Return β€” switch to thumbnail mode / open selected image in image mode. the multitasker. πŸ‘‘
  • f β€” toggle fullscreen mode.
  • b β€” toggle visibility of info bar on bottom of window.
  • Ctrl-x β€” send the next key to the external key-handler. see section EXTERNAL KEY HANDLER for more information.
  • g β€” go to the first image.
  • G β€” go to the last image, or image number count.
  • r β€” reload image.
  • D β€” remove current image from file list and go to next image. brutal. necessary. πŸ’€
  • Ctrl-h, Ctrl-Left β€” scroll left one screen width.
  • Ctrl-j, Ctrl-Down β€” scroll down one screen height.
  • Ctrl-k, Ctrl-Up β€” scroll up one screen height.
  • Ctrl-l, Ctrl-Right β€” scroll right one screen width.
  • + β€” zoom in.
  • - β€” zoom out.
  • m β€” mark/unmark the current image.
  • M β€” reverse all image marks. flip the whole roster.
  • Ctrl-M β€” repeat last mark action on all images from the last marked/unmarked up to the current one.
  • Ctrl-m β€” remove all image marks. clean slate ✨
  • N β€” go count marked images forward.
  • P β€” go count marked images backward.
  • { β€” decrease gamma correction by count steps.
  • } β€” increase gamma correction by count steps.
  • Ctrl-g β€” reset gamma correction.

πŸ–ΌοΈ Thumbnail mode

the following keyboard commands are only available in thumbnail mode:

  • h, Left β€” move selection left count times.
  • j, Down β€” move selection down count times.
  • k, Up β€” move selection up count times.
  • l, Right β€” move selection right count times.
  • R β€” reload all thumbnails.

🌸 Image mode

the following keyboard commands are only available in image mode:

Navigate image list:

  • n, Space β€” go count images forward.
  • p, Backspace β€” go count images backward.
  • [ β€” go count * 10 images backward.
  • ] β€” go count * 10 images forward.

Handle multi-frame images:

  • Ctrl-n β€” go count frames of a multi-frame image forward.
  • Ctrl-p β€” go count frames of a multi-frame image backward.
  • Ctrl-Space β€” play/stop animations of multi-frame images.

Panning:

  • h, Left β€” scroll image 1/5 of window width or count pixel left.
  • j, Down β€” scroll image 1/5 of window height or count pixel down.
  • k, Up β€” scroll image 1/5 of window height or count pixel up.
  • l, Right β€” scroll image 1/5 of window width or count pixel right.
  • H β€” scroll to left image edge.
  • J β€” scroll to bottom image edge.
  • K β€” scroll to top image edge.
  • L β€” scroll to right image edge.

Zooming:

  • = β€” set zoom level to 100%, or count%.
  • w β€” set zoom level to 100%, but fit large images into window.
  • W β€” fit image to window.
  • e β€” fit image to window width.
  • E β€” fit image to window height.

Rotation:

  • < β€” rotate image counter-clockwise by 90 degrees.
  • > β€” rotate image clockwise by 90 degrees.
  • ? β€” rotate image by 180 degrees.

Flipping:

  • | β€” flip image horizontally.
  • _ β€” flip image vertically.

Miscellaneous:

  • a β€” toggle anti-aliasing.
  • A β€” toggle visibility of alpha-channel, i.e. image transparency.
  • s β€” toggle slideshow mode and/or set the delay between images to count seconds.

πŸ–±οΈ MOUSE COMMANDS πŸ–±οΈ

the following mouse mappings are available in image mode:

General:

  • Button3 β€” switch to thumbnail mode.

Navigate image list:

  • Button1 β€” go to the next image if the mouse cursor is in the right part of the window or to the previous image if it is in the left part.

Panning:

  • Button2 β€” pan the image according to the mouse cursor position in the window while keeping this button pressed down.

Zooming:

  • ScrollUp β€” zoom in.
  • ScrollDown β€” zoom out.

πŸŽ€ CONFIGURATION πŸŽ€

the following X resources are supported:

  • background β€” color of the window background and bar foreground
  • foreground β€” color of the window foreground and bar background
  • font β€” name of Xft bar font

please see xrdb(1) on how to change them. ✨


πŸ¦‹ STATUS BAR πŸ¦‹

the information displayed on the left side of the status bar can be replaced with the output of a user-provided script, which is called by sxiv whenever an image gets loaded. the path of this script is $XDG_CONFIG_HOME/sxiv/exec/image-info and the arguments given to it are: 1) path to image file, 2) image width, 3) image height. three little args, one big glow-up. πŸ’–

there is also an example script installed together with sxiv as /usr/share/sxiv/exec/image-info.


πŸ”₯ EXTERNAL KEY HANDLER πŸ”₯

additional external keyboard commands can be defined using a handler program located in $XDG_CONFIG_HOME/sxiv/exec/key-handler. the handler is invoked by pressing Ctrl-x. the next key combo is passed as its first argument. passed via stdin are the images to act upon, one path per line: all marked images, if in thumbnail mode and at least one image has been marked, otherwise the current image. sxiv(1) will block until the handler terminates. it then checks which images have been modified and reloads them. ok that's kind of iconic ngl. πŸ‘‘

the key combo argument has the following form: "[C-][M-][S-]KEY", where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix.

there is also an example script installed together with sxiv as /usr/share/sxiv/exec/key-handler.


πŸ“ THUMBNAIL CACHING πŸ“

sxiv stores all thumbnails under $XDG_CACHE_HOME/sxiv/.

use the command line option -c to remove all orphaned cache files. additionally, run the following command afterwards inside the cache directory to remove empty subdirectories:

find . -depth -type d -empty ! -name '.' -exec rmdir {} \;

spring cleaning but make it a one-liner. 🧚


πŸ’œ AUTHOR πŸ’œ

Bert Muennich <ber.t at posteo.de>

🌈 CONTRIBUTORS 🌈

Bastien Dejean  <nihilhill at gmail.com>
Dave Reisner    <d at falconindy.com>
Fung SzeTat     <sthorde at gmail.com>
Max Voit        <mvdev at with-eyes.net>

⭐ HOMEPAGE ⭐

https://github.com/muennich/sxiv

πŸ‘€ SEE ALSO πŸ‘€

X(7), xrdb(1)


and that's the whole page bestie!! 🫢 this was sxiv-26, page SXIV(1) β€” go forth and view images, you absolute legend. periodt. πŸ’…βœ¨πŸ’–

πŸ“¦ where this page comes from