Screenshot wrapper script, for equal results of SSD/CSD windows

Hi,

I was getting mad with the poor quality of screenshots (compared to those on Mac, for instance), and especially with the lack of cohesion between SSD and CSD windows:

  • Server-side decorated windows are pretty well supported by all screenshot tools, with nice shadow effects, etc.

  • But it is a mess with CSD windows. Depending on the tools: poor cropping with no effect, shadow effect but with the background, no configurability, etc.

And, the worst: you don't get screenshots that look alike across target windows.

As in my job I take a lot of screenshots, and spend a lot of time in a terminal that uses CSD (Tilix), I decided to hack a little script to get something cohesive depending on the type of window.

You can find it here:

To use it in Ubuntu, you will probably just need to install these packages:

apt install maim xdotool xclip imagemagick

It does not come with a GUI, but you can easily map the commands you like to shortcuts: simple and fast.

I would really appreciate any feedback, especially critical ones, if you find any way to improve it.

CSD:

SSD:

2 Likes

Just curious what do you mean by CSD and SSD windows?
For which window manager your script is useful?

@Norbert_X
My script is totally agnostic of the window manager and can be useful anywhere (except Wayland and if you do care about aesthetics details of screenshots).

Client-side decoration is quite new in Linux, used in GTK3 / Gnome applications. It is when the title bar is drawn by the application itself, not by the window manager.
So you get widgets inside the titlebar, like in Gedit, Gnome-disk, Nautilus, and latest versions of Firefox / Chrome (with a particular setting).

SSD are the traditional apps, as mostly found in Mate (with a few exceptions).

You can see the difference here (top = SSD, bottom = CSD):

Try to take some screenshots of both kinds of applications, and you will understand the purpose of my script.

1 Like

Amazing script!

Consider taking user input for $DEST directory. The one that's in your code needs to be created first for it to work.

1 Like