Cannot capture region into clipboard
luispabon opened this issue · comments
Luis Pabon commented
I have a setup with slurp that allows me to select a region then dump it to file. That works fine (there's a bug in slurp with multi outputs but that's a different story).
I'm having trouble however to combine slurp, grim with geometry and wl-copy (to capture to clipboard instead):
# This works fine, region is captured to file
slurp | grim -g - $(xdg-user-dir PICTURES)/Screenshot-region-$(date +'%Y-%m-%d-%H%M%S.png')
# This captures all outputs
slurp | grim - -g | wl-copy
This upsets grim's argument parser:
slurp | grim -g - | wl-copy
~ slurp | grim -g -
Usage: grim [options...] <output-file>
-h Show help message and quit.
-s <factor> Set the output image scale factor. Defaults to the
greatest output scale factor.
-g <geometry> Set the region to capture.
-t png|jpeg Set the output filetype. Defaults to png.
-q <quality> Set the JPEG filetype quality 0-100. Defaults to 80.
-o <output> Set the output name to capture.
-c Include cursors in the screenshot.
Luis Pabon commented
Ahh never mind, I was ofc doing it wrong. If someone reads this:
slurp | grim -g - - | wl-copy