Connect Wayland screenshot tool to ksnip

screenshotwayland

We use ksnip as a company-standard cross platform screenshot annotation tool.
When switching to Wayland, I can take only screenshots via the portal, which is not very efficient.

Is it possible to launch ksnip automatically after taking a screenshot with the gnome / wayland screenshot tool which is default in Ubuntu 22.04 ?
(how is that tool called?)

Currently, as a workaround, I can take a screenshot, copy to clipboard, open ksnip, annoate, export which is very cumbersome.

Best Answer

I think I will bind an additional shortcut for opening ksnip with the clipboard contents to the following script:

xclip -selection clipboard -t image/png -o | ksnip -e -

Thus I can take a screenshot using the standard tool, copy to clipboard (Ctrl+C) and press my new short cut (Is used Ctrl+Shift+Alt+K)

An improvement would be to also simulate pressing Ctrl+C in that shortcut.

But xdotool key 'ctrl+c' did not work for me.

Remark: There is currently a small bug in ksnip, which makes this working not perfect yet, but overall its a good solution for me.

EDIT :I nthe latest nightly that bug is solved in ksnip.