How to take a screenshot in Sway using slurp, grim, and swappy

hahnavi |
about image

slurp is a tool to select a region in a Wayland compositor and print it to the standard output.

grim is a tool to grab images from a Wayland compositor.

swappy is a Wayland native snapshot and editor tool, inspired by Snappy on macOS.

Install slurp, grim, and swappy (Arch Linux)

sudo pacman -S slurp grim swappy

Bind the command to the Print key

Add this line to the sway config file ~/.config/sway/config

bindsym Print exec grim -g "$(slurp)" - | swappy -f -

and then reload Sway.

comments powered by Disqus