Score:3

Connect Wayland screenshot tool to ksnip

gb flag

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.

Score:2
gb flag

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.

Damir Porobic avatar
ru flag
The small issue you mentioned should be fixed now in ksnip v1.10.1
Score:0
ng flag

One way is to set new shortcut for:

ksnip -t

Which captures a screenshot and opens/shows it directly in ksnip portal. Press share button as your usual workflow.

Btw, there are other ways ksnip can be combined in series with other tools as long it can open and save files from command line. Check ksnip -h.

2nd option create a script that watches screenshots folder and launches ksnip to edit new files. Similar to this one: Autostart program whenever a file is added to a folder

gb flag
`ksnip -t` is better than nothing, but it captures a full screen screenshot which needs to be cropped later. The wayland tool is already nice, the question is if there can be some postprocessing added. I am also wondering what is the command for the wayland tool, because that does not show up in the short cut list. it's just the "screenshot action"
user.dz avatar
ng flag
@Alex It doesn't look to be separate tool from gnome-shell. The only approach I could think of right now, is a gnome-shell extension (java-script based) that target and customize that screenshot component. Extend it to open or share captured image with another user set tool.
gb flag
I found an okayisch workaround in my answer https://askubuntu.com/a/1445519/39966
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.