PitchHut logo
A minimal and fast terminal image viewer with sxiv-like keybindings.
Pitch

SVT is a simple and efficient image viewer designed for terminal use. Built with Rust, it provides fast performance through zlib compression and render caching. With intuitive sxiv-like keyboard shortcuts, flexible viewing modes, and capabilities for clipboard integration, SVT enhances image navigation in a minimalist environment.

Description

SVT - Simple Viewer in Terminal

SVT is an efficient, minimalistic image viewer designed for terminal use. Written in Rust, it offers a smooth experience with sxiv-like keybindings, making it an ideal choice for those seeking a lightweight solution to view images directly in the command line interface.

Features

SVT boasts several functionalities that enhance the viewing experience:

  • Fast Navigation: Implementing Zlib compression, prefetch capabilities, and a rendering cache ensures instant navigation between images.
  • Keyboard-Driven: Featuring intuitive sxiv and Vim-inspired keybindings, SVT provides efficient navigation with support for count commands.
  • Clipboard Integration: Easily copy file paths or images to the clipboard, supporting native clipboard functionality with local and X11 systems.
  • Flexible Display Modes: Choose between Fit and Normal display modes to suit your viewing preference while maintaining compatibility with Tmux over SSH.
  • High-Quality Rendering: Utilizes the Kitty Graphics Protocol (KGP) for superior image quality during viewing.
  • Tile Mode: Offers a grid view allowing users to navigate through thumbnails conveniently.

Viewing Modes

SVT supports three distinct viewing modes to cater to various user needs:

  • Normal Mode: Displays images in their original size, with the ability to only shrink the view.
  • Fit Mode: Scales images to fit the viewport for optimal visibility.
  • Tile Mode: Provides a grid thumbnail view for easy selection and navigation through multiple images.

Keybindings

A set of efficient keybindings enhances the user experience:

KeyActionDescription
j, Space, l➡️ NextNavigate to the next image
k, Backspace, h⬅️ PreviousReturn to the previous image
g⏮️ FirstJump to the first image
G⏭️ LastJump to the last image
f🔄 ToggleSwitch between display modes
t🗂️ TileToggle Tile and Single view
Enter✅ SelectConfirm selection in Tile mode
r🔃 ReloadRefresh and clear the cache
y📋 Copy PathCopy the current image path
q🚪 QuitExit the viewer

Configuration

Customization is available through a config file or environment variables, ensuring that SVT can be tailored to suit individual preferences:

nav_latch_ms = 150
render_cache_size = 100
prefetch_count = 5
prefetch_threads = 2
compress_level = 6
cell_aspect_ratio = 2.0
resize_filter = "triangle"
tile_filter = "nearest"
tile_threads = 4

Supported Environments

SVT is compatible with various terminal emulators, including:

For users of Tmux, SVT automatically enables passthrough functionality.

SVT represents a powerful tool for terminal users needing a fast, reliable image viewing solution that respects the lightweight ethos of the command line, while also providing a rich feature set and high-quality visuals.

0 comments

No comments yet.

Sign in to be the first to comment.