Image and document viewer for the gardesk desktop
garview is a feature-rich viewer supporting 17+ image formats, PDFs with full text search and selection, SVG graphics, animated GIFs, and EXIF orientation handling. It features dual view modes (single image and gallery browser), session persistence, slideshow mode, and integration with the gardesk ecosystem.
garview requires several system libraries for image and document support:
garview can open images, directories, or PDFs directly from the command line:
Left/Right - Previous/next image+/- - Zoom in/outf - Fit image to window0 - Actual size (100%)r/R - Rotate clockwise/counter-clockwiseMouse drag - Pan zoomed imageCtrl+scroll - Zoom at cursorg or Tab - Toggle gallery modeh/j/k/l - Navigate thumbnails (vim-style)Enter - Open selected images - Cycle sort modeS - Reverse sort orderScroll - Browse thumbnailsPageDown/PageUp - Next/previous pageHome/End - First/last pageCtrl+G - Go to specific pageF7 - Toggle sidebar with thumbnails/TOC1/2/3 - Single/continuous/dual page viewClick links - Follow internal/external linksCtrl+F - Search text in documentF3/n - Next search resultShift+F3/N - Previous search resultShift+drag - Select textCtrl+C - Copy selected text17+ image formats including PNG, JPEG, GIF (animated), WebP, AVIF, TIFF, plus PDF and SVG documents.
Automatic orientation correction for JPEG images based on camera EXIF data. View metadata with Ctrl+I.
Remembers page position, zoom level, and scroll position per file. Resume exactly where you left off.
Switch between focused single-image viewing and thumbnail gallery browsing with a single keypress.
Full PDF viewing with text search, selection, table of contents, clickable links, and multiple view modes.
Built-in slideshow with adjustable 1-30 second intervals. Combine with --fullscreen for presentations.
| Option | Type | Default | Description |
|---|---|---|---|
path | string? | none | File or directory to open |
--fullscreen, -f | flag | false | Start in fullscreen mode |
--slideshow, -s | flag | false | Start slideshow mode immediately |
garview reads configuration from ~/.config/garview/config.toml:
| Option | Type | Default | Description |
|---|---|---|---|
default_zoom | string | "fit" | Initial zoom mode: fit, fill, or 1:1 |
remember_position | bool | false | Restore scroll position when reopening files |
remember_zoom | bool | false | Restore zoom level when reopening files |
background_color | string | "#1a1b26" | Background color (hex format) |
| Option | Type | Default | Description |
|---|---|---|---|
auto_rotate_exif | bool | true | Automatically rotate images based on EXIF orientation |
interpolation | string | "lanczos" | Scaling algorithm: nearest, bilinear, lanczos |
The default_zoom option accepts these values:
| Mode | Key | Description |
|---|---|---|
| Fit | f | Scale image to fit entirely within viewport (default) |
| Fill | F | Scale image to fill viewport completely (may crop edges) |
| OneToOne | 0 | 100% zoom, 1 image pixel = 1 screen pixel |
| Custom | +/- | Manual zoom level, adjustable with +/- keys |
The interpolation option controls image scaling quality:
Fastest. No interpolation, good for pixel art or when speed matters. May appear blocky when zoomed.
Balanced. Linear interpolation between pixels. Good performance with acceptable quality.
Highest quality (default). Best for photos and detailed images. Slightly slower but minimal artifacts.
| Purpose | Path |
|---|---|
| Configuration | ~/.config/garview/config.toml |
| Recent files & sessions | ~/.local/share/garview/recent.json |
garview is an image and document viewer designed for the gardesk desktop environment. It provides a unified interface for viewing images, browsing photo galleries, and reading PDF documents. Built with the gartk rendering framework, it offers smooth performance with hardware-accelerated rendering.
The viewer operates in two primary modes: Image mode for focused single-file viewing with zoom, pan, and rotation controls, and Gallery mode for browsing directories of images with thumbnail previews and sorting options. For PDF documents, it provides additional features like text search, selection, table of contents navigation, and clickable hyperlinks.
Key differentiators include session persistence (remembering your position in documents), EXIF-aware orientation handling, animated GIF support with proper frame timing, and a built-in slideshow mode for presentations.
garview uses a modular architecture with pluggable backends for different file formats:
┌─────────────────────────────────────────────────────┐ │ Application │ │ ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │ │ │ Image │ │ Gallery │ │ Sidebar │ │ │ │ Viewer │ │ View │ │ (Thumbnails/TOC) │ │ │ └────┬─────┘ └────┬─────┘ └────────┬─────────┘ │ │ │ │ │ │ │ ┌────┴─────────────┴──────────────────┴────────┐ │ │ │ Backend Manager │ │ │ │ ┌─────────┐ ┌─────────┐ ┌─────────────────┐ │ │ │ │ │ Image │ │ PDF │ │ SVG │ │ │ │ │ │ Backend │ │ Backend │ │ Backend │ │ │ │ │ │ (image) │ │(poppler)│ │ (resvg) │ │ │ │ │ └─────────┘ └─────────┘ └─────────────────┘ │ │ │ └──────────────────────────────────────────────┘ │ │ │ │ ┌─────────────────────────────────────────────┐ │ │ │ gartk-render (Cairo/GPU) │ │ │ └─────────────────────────────────────────────┘ │ └─────────────────────────────────────────────────────┘
Each backend implements a common trait providing format detection, loading, rendering, and format-specific capabilities. The backend manager automatically selects the appropriate backend based on file extension and MIME type detection.
Handles raster images using the image crate. Supports 17 formats including PNG, JPEG,
GIF, WebP, AVIF, TIFF, and more. Features:
Uses poppler-glib for PDF rendering. Pages are rasterized at the current zoom level using Cairo image surfaces, then converted from BGRA to RGBA for display. Capabilities:
Uses resvg for high-quality SVG rendering. Rasterizes at the current zoom level for crisp display at any scale. Handles complex SVG features including filters, gradients, and text.
garview uses gartk-render, the same Cairo-based rendering system used by other gardesk components. The pipeline handles coordinate transformation, zoom calculations, and efficient partial redraws:
The zoom range spans 5% to 2000% (0.05x to 20x), with 1.25x steps for zoom in/out operations. Scroll-wheel zoom at cursor maintains the pointed location stable during zoom operations.
garview implements caching at multiple levels to optimize performance:
garview operates in two primary modes, switchable with Tab
or g:
The primary viewing mode for focused single-file display. Features include:
For multi-page documents, page navigation keys (PageUp/PageDown/Home/End) are available, and scrolling past page bounds automatically advances to the next page.
A thumbnail browser for navigating directories of images. When you open a directory or toggle from image mode, garview displays a grid of thumbnails from the current image's directory.
Navigation uses vim-style keys (hjkl) or arrow keys. Press Enter or Space to open the selected
image in Image mode. The gallery supports three sort modes (name, date, size) cyclable with
s, and reversible with S.
| Sort Mode | Description |
|---|---|
| Name | Sort alphabetically by filename |
| NameDesc | Reverse alphabetical order |
| Date | Sort by modification time (newest first) |
| DateDesc | Sort by modification time (oldest first) |
| Size | Sort by file size (largest first) |
| SizeDesc | Sort by file size (smallest first) |
For multi-page documents (PDFs), garview offers three viewing layouts:
| Mode | Key | Description |
|---|---|---|
| Single Page | 1 | Display one page at a time, navigate with PageUp/PageDown |
| Continuous | 2 | Scroll through pages continuously like a web page |
| Dual Page | 3 | Display two pages side-by-side like an open book |
Press V to cycle through modes, or use the number
keys for direct access. In continuous mode, scrolling flows naturally between pages. In single
page mode, scrolling past the bottom advances to the next page.
The zoom system supports four modes with a range of 5% to 2000%:
Ctrl+scroll wheel zooms at the cursor position, keeping the pointed location stable. This is particularly useful for examining specific areas of large images or documents.
Pan with mouse drag or arrow keys. When the image is smaller than the viewport, it's automatically centered. Panning is clamped to image bounds to prevent scrolling into empty space.
Images can be rotated and flipped for correct orientation:
r - Rotate 90 degrees clockwiseR - Rotate 90 degrees counter-clockwiseh - Flip horizontally (mirror)v - Flip vertically
Rotations are applied on top of EXIF auto-rotation. If auto_rotate_exif
is enabled (default), JPEG images from cameras are automatically oriented correctly before any
manual rotation is applied.
Built-in slideshow mode auto-advances through images in a directory:
s - Toggle slideshow on/off[ - Decrease interval by 0.5 seconds (min 1s)] - Increase interval by 0.5 seconds (max 30s)--slideshow - Start in slideshow mode from CLI
Combine with --fullscreen for presentation mode.
The default interval is 5 seconds, adjustable in 0.5-second increments from 1 to 30 seconds.
For PDF documents, garview provides full text interaction:
Search is backend-dependent - it's available for PDFs (via poppler's text extraction) but not for raster images. The search state (query, results, current index) persists until Escape is pressed.
garview integrates with system clipboard using arboard:
Ctrl+C - Copy selected text (PDFs)Ctrl+Shift+C - Copy current image to clipboardPDF rendering uses poppler-glib, the same library powering Evince and other GTK PDF viewers. Pages are rendered to Cairo image surfaces at the current zoom level, then pixel-converted from Cairo's BGRA format to RGBA for display.
The white background is drawn first, then the PDF content is rendered on top. This ensures proper rendering of PDFs with transparency. Font rendering uses system font fallbacks when embedded fonts are missing.
Multiple navigation methods for PDF documents:
PageDown/PageUp - Next/previous pageHome/End - First/last pageCtrl+G - Go to specific page numberScroll at bounds - Auto-advances in single-page modeArrow keys at bounds - Navigate pages when panning hits edgeSidebar click - Jump to any page via thumbnailTOC click - Jump via table of contents entrygarview supports three types of PDF links:
The table of contents is extracted from the PDF's document outline using poppler's index iterator. It appears in the sidebar (F7) as a hierarchical tree with depth indication. Click any entry to jump to that section.
Full-text search across all PDF pages:
Ctrl+F to open search dialogF3 or n for next resultShift+F3 or N for previousEscape to clear search
Toggle the sidebar with F7. The 200-pixel sidebar
provides two tabs:
Page previews for multi-page documents. Click any thumbnail to jump to that page. Current page is highlighted. Scrolls automatically to keep current page visible. Thumbnails are 150px height with 10px padding.
Document outline/bookmarks extracted from PDF metadata. Hierarchical display with indentation. Click any entry to navigate to that section. Only available if the PDF includes outline data.
The sidebar interacts with scroll events - scrolling while the cursor is over the sidebar scrolls the sidebar content, not the document.
garview remembers your viewing state for each file, stored in ~/.local/share/garview/recent.json.
For each recently opened file, the following state is tracked:
When you reopen a file, garview restores your position if remember_position
and/or remember_zoom are enabled in config. Session
is saved automatically when navigating away from a file or closing garview.
Press Ctrl+R to open the recent files panel. garview
tracks up to 50 recently opened files (configurable via max_entries).
Features:
d or BackspaceThese keybindings work in all modes:
| Key | Action |
|---|---|
| q | Quit garview |
| Tab, g | Toggle between Image and Gallery mode |
| F11 | Toggle fullscreen |
| F7 | Toggle sidebar |
| Ctrl+F | Open search dialog (PDFs) |
| F3, n | Find next search result |
| Shift+F3, N | Find previous search result |
| Ctrl+G | Go to page dialog (PDFs) |
| Ctrl+R | Open recent files panel |
| Ctrl+I | Show file properties/EXIF data |
| Ctrl+C | Copy selected text to clipboard |
| Ctrl+Shift+C | Copy current image to clipboard |
| Escape | Cancel search/dialog, clear selection |
Active when viewing a single image or document:
| Key | Action |
|---|---|
| +, = | Zoom in (1.25x) |
| - | Zoom out (0.8x) |
| 0 | Zoom to 100% (1:1 pixels) |
| f | Fit image in viewport |
| F | Fill viewport (may crop) |
| Right, n, Space | Next image/page |
| Left, p | Previous image/page |
| r | Rotate clockwise 90 degrees |
| R | Rotate counter-clockwise 90 degrees |
| h | Flip horizontally |
| v | Flip vertically |
| V | Cycle document view mode (Single/Continuous/Dual) |
| Up/Down | Pan vertically (or navigate pages at bounds) |
| s | Toggle slideshow |
| [ | Decrease slideshow interval (min 1s) |
| ] | Increase slideshow interval (max 30s) |
| PageDown | Next page (multi-page documents) |
| PageUp | Previous page |
| Home | First page |
| End | Last page |
| 1 | Single page view mode |
| 2 | Continuous scroll view mode |
| 3 | Dual page (book) view mode |
Active when browsing thumbnails:
| Key | Action |
|---|---|
| Right, l | Select next thumbnail |
| Left, h | Select previous thumbnail |
| Down, j | Move selection down |
| Up, k | Move selection up |
| Enter, Space | Open selected image |
| s | Cycle sort mode (Name > Date > Size) |
| S | Reverse current sort order |
garview supports 17 raster image formats via the Rust image crate:
| Format | Extensions | Features |
|---|---|---|
| PNG | .png | Full transparency, metadata |
| JPEG | .jpg, .jpeg | EXIF orientation, thumbnails |
| GIF | .gif | Animation playback with frame delays |
| WebP | .webp | Lossy and lossless, animation |
| AVIF | .avif | AV1 codec, HDR support |
| BMP | .bmp | Windows bitmap |
| TIFF | .tiff, .tif | Multi-page, metadata |
| ICO | .ico | Multi-resolution icons |
| TGA | .tga | Targa format |
| DDS | .dds | DirectDraw Surface textures |
| QOI | .qoi | Quite OK Image format |
| EXR | .exr | OpenEXR HDR images |
| PNM | .ppm, .pgm, .pbm | Portable anymap family |
| Farbfeld | .ff | Suckless image format |
| APNG | .apng | Animated PNG |
Document formats with additional features:
| Format | Extensions | Features |
|---|---|---|
| Text search, selection, links, TOC, multi-page | ||
| SVG | .svg | Vector graphics via resvg |
garview fully supports animated image formats:
Frame-accurate playback with delay handling. Each frame's delay is extracted from the GIF data, with a minimum of 10ms and default of 100ms if unspecified. Animation loops continuously.
Animated PNG support with full alpha channel. Higher quality than GIF with better compression. Frame delays honored for smooth playback.
JPEG images often contain EXIF orientation data from the camera. garview automatically applies the correct rotation/flip based on this metadata:
| Value | Transformation |
|---|---|
| 1 | Normal (no transformation) |
| 2 | Flip horizontal |
| 3 | Rotate 180 degrees |
| 4 | Flip vertical |
| 5 | Rotate 90 degrees CW + flip horizontal |
| 6 | Rotate 90 degrees CW |
| 7 | Rotate 90 degrees CCW + flip horizontal |
| 8 | Rotate 90 degrees CCW |
Set auto_rotate_exif = false in config to disable
automatic rotation and view images as stored on disk.
OpenEXR (.exr) support enables viewing HDR images. These are tone-mapped for display on standard monitors. This is useful for photography workflows, CGI renders, and scientific visualization.
garview uses the infer crate for MIME type detection,
falling back to file extension when magic bytes aren't recognized. This ensures correct handling
even when files have wrong extensions.
PDF support requires poppler-glib. Install the library:
AVIF requires libavif. Install the library:
EXIF auto-rotation may conflict with already-rotated images. Disable it in config:
Or use manual rotation keys (r/R) to correct orientation.
Gallery only shows files with recognized image extensions. Check that your files have standard extensions (.jpg, .png, etc.) and aren't in subdirectories. Hidden files (starting with .) are excluded by default.
Session persistence requires both config options enabled:
Also check that ~/.local/share/garview/ is writable.
The PDF may be image-only (scanned document without OCR). Poppler can only search text embedded in the PDF. For scanned documents, use OCR tools like Tesseract first.
Large GIFs with many frames may cause performance issues. garview loads all frames into memory. For very large animations, consider converting to video format.
Clipboard requires arboard, which needs X11 or Wayland clipboard access. On Wayland, ensure wl-clipboard is installed:
Enable debug logging for troubleshooting:
To clear all saved state and start fresh:
When reporting bugs, please include:
garview --version)RUST_LOG=debug)