Bug 473521 - Add command line arguments to Spectacle to define which region to capture so no UI pops up
Summary: Add command line arguments to Spectacle to define which region to capture so ...
Status: REPORTED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: 23.04.3
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-19 07:07 UTC by m.kurz
Modified: 2023-08-23 15:58 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description m.kurz 2023-08-19 07:07:18 UTC
SUMMARY
***
I want to run Spectacle in the background to capture a region automatically (and then exit) without showing a UI at all. However currently, even when running with -b (background) mode, Spectacle always displays the region selection screen:

  spectacle -b -c -r -n

This runs spectacle in background, copies the screenshot of a region and does not display notifcations.
However, with -r the selection tool to select the region always pops up and I need to manually confirm the region to capture, even when in the spectacle config it is set to remember the last rectangular region.

Without -r (therfore capturing the whole screen) Spectacle does what expected and immediately quits after the screenshot was saved (not showing any UI).

I therefore suggest to allow -r to take optional arguments to defined the region, like "-r <top,left,width,height>", for example:
 
  -r 450,260,1324,690

***

STEPS TO REPRODUCE
1. spectacle -b -c -r -n

OBSERVED RESULT
1. UI with region selection pops up
2. Need to confirm the region to copy to the clipboard
3. Only then spectacle exits

EXPECTED RESULT
1. No UI pops up
2. I would NOT need to confirm anything, everything should be done automatically (either by using the last selected region if that config is saved or maybe better with optional arguments like -r <top,left,width,height>
3. spectacle exits

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux ARM
KDE Plasma Version:  5.27.7
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10