简体中文
Documentation Menu▾
Core Guides

Capturing & Regions

Multi-monitor physical-pixel freezing, smart region & compositor window snapping, precision HUD aids, pre-selection targets, and headless captures.

Shotori captures frames directly from the Wayland compositor via zwlr-screencopy-v1 at each monitor’s native physical resolution, then composites an interactive wlr-layer-shell surface across every output simultaneously.

Multi-Monitor & Mixed HiDPI Geometries

Linux setups often combine a 2× or 1.5× laptop panel with a 1× or rotated external monitor. Shotori tracks wl_output and zxdg_output_v1 logical geometries alongside physical buffer dimensions:

  • Selections can start on one monitor and end on another.
  • Rotated (90°, 180°, 270°) and flipped outputs are transformed faithfully.
  • Exported screenshots preserve crisp physical pixel density without blurry compositor upscaling.

Smart Region & Window Snapping

Before you even drag, Shotori helps lock onto clean boundaries:

  1. Compositor Window Snapping ([capture] window_snap = true) — Queries IPC on niri, sway (GET_TREE), and Hyprland (j/clients) to snap directly to window bounds.
  2. Pixel Smart Regions (smart_region = true) — Detects UI cards, panes, split views, and buttons directly from pixel edges. Hover over any element, roll the mouse wheel to expand or narrow through nested containers, and click once to commit the selection.

Precision HUD Controls

Configure visual aiming aids in shotori settings capture or ~/.config/shotori/settings.toml:

  • Dimension Badge (capture.size_label): Switch between "logical" (684 × 412), "physical" (1368 × 824 px), "bounds" (120, 80 · 684 × 412), or "hidden".
  • Pixel Loupe (capture.loupe): Displays a 2×–8× magnified pixel grid (small, medium, or large) whenever dragging selection corners or handles.
  • Alignment Crosshair (capture.crosshair): Full-screen horizontal and vertical hairlines while aiming.
  • Keep Overlay Open: Enable keep_open_after_copy or keep_open_after_save when exporting multiple crops or variations from the same frozen frame.

Pre-Selected Interactive Targets (shotori gui)

Skip manual framing when you already know what you want to annotate:

shotori gui --window                  # Pre-select the focused window
shotori gui --screen                  # Pre-select the focused monitor
shotori gui --output DP-1             # Pre-select a named Wayland output
shotori gui --region "100,200 800x600"# Pre-select explicit logical coordinates
shotori gui --full                    # Pre-select the entire desktop
shotori gui --delay 3 --window        # Wait 3s for context menus before freezing
shotori gui --window --tool rectangle # Pre-select window and arm Rectangle immediately

Headless Captures (shotori full)

When you don’t need interactive chrome at all, shotori full captures and exits immediately:

# Copy focused monitor to Wayland clipboard
shotori full --screen

# Save focused window to a directory with auto-generated filename
shotori full --window --path ~/Pictures/Shotori

# Stream PNG bytes to stdout for Unix pipelines (suppressing notifications)
shotori full --region "0,0,1280,720" --stdout --no-notify | magick - -resize 50% thumb.png

See the CLI Subcommands reference for every flag and geometry format.