Until this issue is solved, does by chance anyone have a solution to easily remove the shadow from the screenshots ? Right now I open the screenshots with GIMP and crop the picture to remove the shadow. Does anyone have an idea on how to automate this with a script ? Sometimes I have tens of screenshots to process, it’s quite time consuming…
That worked well for me on light style with a GTK3 app and a libadwaita app. It may need some tweaking on the -fuzz option if you use dark style or for other toolkits. It leaves the corner shadow.
Here a screenshot of a libadwaita app, where I have made the background blue so you can see the padding (as per above link, for libadwaita apps there is currently a double padding):
In a shell script you could use inotifywait to watch a certain input directory for newly saved screenshots, and have it use the above command to convert them and save to a (different) output directory where you can then find your trimmed screenshots.
Works perfectly, even on Qt apps (tested on VirtualBox, Okular, Dolphin). Great idea concerning inotify too, I will test that.
Note :
For GTK apps, another approach is to remove the shadow altogether through ~/.config/gtk-3.0/gtk.css :
decoration {
box-shadow: none;
margin: 0px;
}
Works on most of the GTK3 apps (tested on Nautilus, Calculator, Firefox). Doesn’t work on some other GTK apps though, most notably GIMP (maybe because my version, 2.10, still uses GTK2 I believe).