Ability to output to file and stdout simultaneously.
cedws opened this issue · comments
Connor Edwards commented
It would be nice if there were a parameter to output to a file and stdout simulatenously. An example use case is:
grim -g "$(slurp)" ~/Pictures/$(date +'%H%M%S-%Y-%m-%d.png') | wl-copy
Of course, you could also do something like the following:
grim -g "$(slurp)" ~/Pictures/$(date +'%H%M%S-%Y-%m-%d.png') && wl-copy < ~/Pictures/$(date +'%H%M%S-%Y-%m-%d.png')
but that's pretty long and unwieldy, especially when in a Sway config file.
I am happy to implement this if you are open to the idea.
Simon Ser commented
Is this good enough?
grim -g "$(slurp)" - | tee ~/Pictures/$(date +'%H%M%S-%Y-%m-%d.png') | wl-copy
Connor Edwards commented
Works excellently! Let's add this to the README.