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.13k stars 78 forks source link

`maim -s` prints help, requires filename #279

Closed coreyogburn closed 1 month ago

coreyogburn commented 1 year ago

maim's help claims: "By default it outputs the encoded image data directly to standard output."

Running maim -s or maim --select on Ubuntu 20.04 only prints the help. Adding a filename results in a screenshot being taken but the image is stored in the file and not output to stdout.

slyshot commented 1 year ago

That seems intentional: https://github.com/naelstrof/maim/blob/463492be48143dca3bc6fa6c3555ffb9f54d3a5a/src/main.cpp#L457-L462 This is a doc bug, the help shouldn't say that. Wonder how one could best phrase the actual behavior. "When not in a tty, the program sends the encoded image data to standard output" ?

foxpy commented 1 year ago

Wonder how one could best phrase the actual behavior.

Well, I have an idea actually. The current doc says this:

"By default it outputs the encoded image data directly to standard output."

I think we can replace it with this:

"By default it outputs the encoded image data directly to standard output, unless standard output is a terminal."