Display clipboard


(Anatoly Techtonik) #1

Would it be awesome if G’MIC could directly operate on clipboard data?


(Mica) #2

At least on Unix-like systems, there are multiple clipboards. This would be confusing. I think I’d rather have a file on disk, it simplifies a lot of things.


#3

xsel -b | gmic … | xsel -b


(Anatoly Techtonik) #4

Which clipboard will it be then?


(Mica) #5

xsel uses your xsession clipboard from the terminal.


(Anatoly Techtonik) #6

And what are other clipboards on Linux? What clipboard is used for PrintScreen key?


(Mica) #7

There is the Primary Selection and the Clipboard Selection. Print screen usually goes to the Clipboard Selection, but that depends on your desktop environment (KDE, GNOME, et al) or window manager. My window manager of choice, i3, didn’t have any action for print screen out of the box. I bound print screen to a scrot command that then opens in GIMP.

You can read more here: https://www.jwz.org/doc/x-cut-and-paste.html

I personally use a clipboard manager, parcellite, and use it to synchronize the primary secection and clipboard, that lets me paste between x11 and console application. That feature aside, the tracking of history is great, and I’m not sure how I was productive before I had a tool like this.


(Anatoly Techtonik) #9

On Windows there is only one clipboard, so there is no problem there to find pixels for G’MIC.

What is the best lookup order for screenshots on Linux? Which location should be checked first and how G’MIC can do this? I guess this:

  1. Check for pixels in Clipboard Selection (how to detect that this type of clipboard is present on the system?)
  2. If not found, check Primary Selection

(Anatoly Techtonik) #10

1.7.9 adds -screen command. Yay! =)