Bug 470618 - Command line option to take screenshot instantly
Summary: Command line option to take screenshot instantly
Status: RESOLVED NOT A BUG
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-04 01:01 UTC by deresiant
Modified: 2023-06-11 11:21 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Image of UI I don't want to see (23.13 KB, image/jpeg)
2023-06-11 07:24 UTC, deresiant
Details

Note You need to log in before you can comment on or make changes to this bug.
Description deresiant 2023-06-04 01:01:49 UTC
SUMMARY
Currently spectacle can select a region to screenshot and take an image of it through `spectacle -b -r -o filename.png`. But it always has the UI for "save, save as , copy, export etc..." on the region select screen and it always requires either double clicking or pressing enter to save finish taking the screenshot.

I'm looking for a way to use spectacle with *just*
1. execute spectacle through command line with cli parameters
2. region selection without any other UI elements
3. immediately finish taking screenshot after letting go of left mouse button

For reference, what I'm talking about is like:
`grim -g "$(slurp)"` using https://git.sr.ht/~emersion/grim in combination with https://github.com/emersion/slurp
and gnome-screenshot's `gnome-screenshot -a -f file.png`
and `maim --select file.png` with https://github.com/naelstrof/maim

I think none of the above work on KDE plasma for different reasons (maim is x11 only, grim uses a wlroots extension, and I think gnome-screenshot only works with gnome's compositor)
Comment 1 deresiant 2023-06-04 01:04:13 UTC
> I think none of the above work on KDE plasma for different reasons (maim is
> x11 only, grim uses a wlroots extension, and I think gnome-screenshot only
> works with gnome's compositor)

Oops, I meant that none of those work on plasma wayland. I know that KDE plasma has X11, but I was only thinking in the context of plasma wayland.
Comment 2 Nate Graham 2023-06-05 15:40:16 UTC
I believe you're looking for background mode. From `spectacle --help`:

>   -b, --background                        Take a screenshot and exit without
>                                           showing the GUI

So try `spectacle -rb`.
Comment 3 deresiant 2023-06-11 07:24:09 UTC
Created attachment 159591 [details]
Image of UI I don't want to see

I've added an image to show what UI I don't want to see. using "spectacle -rb" still shows this.
Comment 4 Noah Davis 2023-06-11 11:21:14 UTC
> 3. immediately finish taking screenshot after letting go of left mouse button

This option is in the settings dialog on the General page under the Rectangular Region Selection heading. It is called "Accept on click-and-release".