Skip to content

About

Pin a screenshot to your screen. A Snipaste-style screen pinning tool for the Niri Wayland compositor.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Sniripaste

Pin a screenshot to your screen. A Snipaste-style screen pinning tool for the Niri Wayland compositor.

Press a hotkey, drag a region, and the captured pixels stay floating on top while you work.

Alt text

Why

Reference a diagram while writing code. Compare two designs side-by-side. Keep an error message visible while you fix it. Pin the clipboard image without saving a file.

Features

  • Region capture — drag-to-select via slurp, pin the result.
  • Clipboard pin — pin whatever image is on your clipboard.
  • Multi-pin — as many floating windows as you want, each independently closeable.
  • Stays out of the way — pins live in Niri's floating layer.
  • Keyboard actions on a focused pin — copy to clipboard, save to disk, rotate, flip.
  • Zero-config daemon — auto-spawns on first use, or run it as a systemd user service.

Usage

sniripaste capture       # drag a region, get a pin
sniripaste clipboard     # pin the clipboard image
sniripaste list          # show every live pin
sniripaste close <id>    # close one pin
sniripaste close-all     # close every pin

Keyboard shortcuts (focused pin window)

Key Action
Ctrl+C Copy the pin's pixels to the clipboard
Ctrl+S Save as PNG to the configured directory
] / [ Rotate 90° clockwise / counter-clockwise
H / V Flip horizontal / vertical

Copy and save trigger a desktop notification via notify-send; rotate/flip update the window in place. Edits stack — rotating then flipping operates on the latest pixels, not the original capture.

Configuration

Optional. Drop a TOML file at ~/.config/sniripaste/config.toml:

save_dir = "~/Pictures/sniripaste"
filename_template = "sniripaste-{timestamp}.png"

Both fields are optional; missing fields fall back to the defaults shown. The {timestamp} token expands to local time as YYYYMMDD-HHMMSS.

Install

Requires Rust stable, an active Niri session, and slurp + wl-clipboard. libnotify (for notify-send) is optional but recommended — without it, copy/save still work but produce no desktop toast.

sudo pacman -S slurp wl-clipboard libnotify
cargo build --workspace --release
install -Dm755 target/release/sniripaste        ~/.local/bin/sniripaste
install -Dm755 target/release/sniripaste-daemon ~/.local/bin/sniripaste-daemon

Append contrib/niri-config-snippet.kdl to ~/.config/niri/config.kdl — Niri reloads it automatically.

Press Mod+Shift+S, drag, and a pin appears.

Optional: run the daemon as a systemd user service
install -Dm644 contrib/sniripaste-daemon.service \
               ~/.config/systemd/user/sniripaste-daemon.service
pkill -f sniripaste-daemon; or true
systemctl --user daemon-reload
systemctl --user enable --now sniripaste-daemon.service

If the unit fails with WAYLAND_DISPLAY is unset, import the session env once:

systemctl --user import-environment WAYLAND_DISPLAY XDG_RUNTIME_DIR XDG_CURRENT_DESKTOP
systemctl --user restart sniripaste-daemon.service

Logs: journalctl --user -f -u sniripaste-daemon.service

Environment variables
  • SNIRIPASTE_SOCKET — override the daemon socket path.
  • SNIRIPASTE_SAVE_DIR — write every capture to <dir>/pin-<id>.png.
  • RUST_LOG — daemon verbosity (default info).

Status

MVP. Capture, clipboard pin, multi-window rendering, and IPC all work end-to-end on Niri. Should also work on any wlroots compositor implementing zwlr_screencopy_v1, though only Niri is tested.

Not yet: annotations, OCR, color picker, packaging.

Known limitations:

  • Pins on scaled monitors render at physical-pixel size.
  • Pins hide behind focused fullscreen windows — intentional in Niri's floating-layer design.

License

MIT.

About

Pin a screenshot to your screen. A Snipaste-style screen pinning tool for the Niri Wayland compositor.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages