naelstrof / maim

maim (make image) takes screenshots of your desktop. It has options to take only a region, and relies on slop to query for regions. maim is supposed to be an improved scrot.
Other
2.15k stars 78 forks source link

Option to automatically choose title and path for screenshot #196

Closed Cocosushi6 closed 4 years ago

Cocosushi6 commented 4 years ago

When not given any path to save an image, scrot automatically selects one based on the current time and date, and saves the screenshot in the current user's HOME directory, e.g : 20YY-MM-DD-TIME_scrot.png.

While maim has a better default which is to forward the screenshot's content to stdout, I think this option would still be useful, for example when you have to take multiple screenshots at once : having to type a new filename for every screenshot taken is a bit slow. Furthermore, when using launchers such as rofi, the launcher's history gets quickly polluted by the numerous different calls to maim.

EDIT : this can be also achieved with the following command : maim > "$(date -u +"%Y-%m-%dT%H:%M:%SZ")_maim.png", which can eventually be put in a script file to avoid having to rewrite it every time.

naelstrof commented 4 years ago

Yeah maim already includes this feature in the sense that you can give it a filename to output. (maim ~/Pictures/$(date +%s).png). It may not be as easy to type as just a flag, but to alleviate that you can simply make a script and alias to it if you want.

Here's a script example placed in /usr/local/bin/

#!/bin/bash
maim ~/Pictures/$(date +%s).png

You should even be able to add flags to it and use it like usual. Just can't specify another output.

Cocosushi6 commented 4 years ago

Yup, well I guess this is even better. No point anymore in this issue, I'll think twice before opening another one :) Thank you for your work on maim! I'm closing the issue.