Latchshot: a lightweight yet intelligent window-aware screenshot tool for Wayland
GitHub: https://github.com/so1ve/latchshot
I built Latchshot because niri's default setup exposes separate actions for region, output, and window screenshots which means I have to remember 3 different keybindings and decide which one to use before taking a screenshot.
I wanted a tool that wouldn't make me choose a capture mode first. When Latchshot opens, the selection automatically latches onto the window under the pointer (that's where the name comes from). Click once to capture that window. Hold the left mouse button and drag, and it becomes a free-form region selection instead. If you want the whole output, just press F.
Currently, it supports niri, Sway, Hyprland, and Mango. Other compositors may work but window selection is not supported. If you want to use Latchshot with a compositor that isn't supported, please open an issue and I'll see what I can do.
To use latchshot in niri, simply add the following keybinding to your niri config:
Print { spawn "latchshot"; }
Personally I don't use other compositors but since their IPCs are quite direct and simple, so they should work well. Feedbacks are welcome!