3 ms·
I use grim with sway / wayland and it works great, much better than scrot on X (which always leaves strange visual artifacts on the image when using rectangular
by dbrgn 6y ago
I use grim with sway / wayland and it works great, much better than scrot on X (which always leaves strange visual artifacts on the image when using rectangular selection).
Here's my key binding config from sway:
bindsym print exec filename=$(date +'screenshot-%Y%m%d-%H%M%S.png') && swaymsg -t get_tree | jq -r '.. | (.nodes? // empty)[] | select(.pid and .visible) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp | grim -g - /tmp/$filename && notify-send "Screenshot captured" "/tmp/$filename"