Spectacle rectangular region co-ordinates specificaiton from CLI

Hi,
Spectacle does allow specifying a rectangular region through the -r option. The has to drag and drop the specify the rectangular region. Is there any way to pass these params through the CLI itself. I can simulate the clicks and mouse movement and click through xdotool, but is their a better mechanism.

Thx
sridhar

At the moment, Spectacle doesn’t have a way to programmatically specify the size and position of the rectangular region.

Modify cropRegion in ~/.config/spectaclerc before calling Spectacle?

Hi Angus,
That could work (and does too). The only issue is that it requires a final “return” keyto be presssed by the user. and does not dwell well my use case

Thanks
Sridhar

Ksnip has an option to launch a “last selected area” with the -l command. Maybe not what you’re looking for, but hey…
It’s very similar to spectacle and has some more functionality.

The sizes and coordinates are stored in ~/.config/ksnip/ksnip.conf. You can launch those with the ksnip --lastrectarea command. The problem is that you cannot launch those in a fixed command ( like for usage in a desktop app, context menu entry…etc…) since they’re overruled each time you take a new rectangular shot. So if you’d like them in a certain screen position with a certain size at all times, you’d have to make it once and never do a new rectangular shot again.

You could also have a look at stuff like scrot or maim ( and some) for simple command line options which you could in a script or something.

Use spectacle -rw

padding.