LinuxCommandLibrary

nsxiv

View images quickly and simply

TLDR

Open images

$ nsxiv [path/to/file1 path/to/file2 ...]
copy

Open images from directories in image mode
$ nsxiv [path/to/directory1 path/to/directory2 ...]
copy

Search directories recursively for images to view
$ nsxiv [[-r|--recursive]] [path/to/directory1 path/to/directory2 ...]
copy

Quit nsxiv
$ <q>
copy

Switch to thumbnail mode or open selected image in image mode
$ <Enter>
copy

Count images forward in image mode
$ <n>
copy

Count images backward in image mode
$ <p>
copy

SYNOPSIS


nsxiv [OPTIONS] FILE...

PARAMETERS

-a
    Auto-reload images when they change on disk.

-b <pixels>
    Set border width around images.

-c
    Copy currently viewed file's path to clipboard.

-f
    Start in fullscreen mode.

-g <GEOMETRY>
    Set window position and size (e.g., 1024x768+0+0).

-i
    Invert image colors.

-o <COMMAND>
    Open current image with a specified command.

-q
    Suppress warnings.

-s <MODE>
    Set image scaling mode (e.g., 'f' for fit, 'F' for fill, 'w' for width).

-t
    Start in thumbnail mode.

-v
    Print version information and exit.

-z <FACTOR>
    Set initial zoom factor (e.g., 0.5 for 50%).

-D
    Disable external script execution.

-E
    Enable EXIF tag display in the status bar.

-P
    Always play videos/GIFs with the external player instead of displaying them natively.

-T <DIR>
    Specify an alternative thumbnail cache directory.

DESCRIPTION


nsxiv is a highly customizable and fast image viewer for X, forked from sxiv (Simple X Image Viewer). It extends its predecessor's capabilities by adding crucial features such as native video playback (leveraging external players like mpv or mplayer), animated GIF and APNG support, and enhanced thumbnail generation.
It maintains the minimalist design and responsiveness of sxiv, focusing on speed and efficiency, making it ideal for quickly browsing large collections of images and videos.
nsxiv is designed to be scriptable, allowing users to define custom actions for images and videos through external scripts, integrating seamlessly into workflows. Its keyboard-driven interface, inspired by Vim, provides efficient navigation and manipulation without relying on mouse input.
The viewer also supports displaying EXIF metadata, offers various scaling modes, and allows for extensive customization via Xresources or a configuration file, making it a versatile tool for both casual browsing and more advanced media management.

CAVEATS


nsxiv is an Xorg-dependent application, meaning it requires an X server to run and cannot be used in a purely console environment.
Video and animated GIF/APNG playback functionality relies on external programs like mpv or mplayer being installed and properly configured, as nsxiv itself does not embed media codecs.
Performance with extremely large image collections in thumbnail mode might vary based on system resources and configuration.

KEYBINDINGS


nsxiv features a Vim-like keybinding system for efficient navigation and control. Common actions include 'h', 'j', 'k', 'l' for navigation, '+' and '-' for zooming, 'r' for rotating, and 'q' to quit. These are highly configurable via the configuration file.

CONFIGURATION


Configuration is primarily handled through Xresources or a dedicated configuration file (e.g., ~/.config/nsxiv/config). This allows users to customize aspects like default scaling, border width, thumbnail dimensions, keybindings, and external command behaviors.

SCRIPTING


A core feature of nsxiv is its robust scripting interface. Users can define external scripts that execute actions on the currently viewed image or video, triggered by custom keybindings. This enables powerful integrations for tasks like file management, image manipulation, or sharing to online services.

HISTORY


nsxiv originated as a community-driven fork of sxiv (Simple X Image Viewer). While sxiv focuses purely on image viewing with a minimalist design, users desired additional features like video playback, animated GIF support, and more robust scripting capabilities.
nsxiv was created to fulfill these needs, integrating advanced functionalities while striving to maintain the core principles of speed, simplicity, and efficiency that define its predecessor. It has evolved to become a popular choice for users seeking a powerful yet lightweight media viewer with extensive customization options.

SEE ALSO

sxiv(1), feh(1), mpv(1), mplayer(1)

Copied to clipboard