Would it be awesome if G’MIC could directly operate on clipboard data?
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.
xsel -b | gmic … | xsel -b
Which clipboard will it be then?
xsel uses your xsession clipboard from the terminal.
And what are other clipboards on Linux? What clipboard is used for PrintScreen key?
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.
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:
- Check for pixels in Clipboard Selection (how to detect that this type of clipboard is present on the system?)
- If not found, check Primary Selection
-screen command. Yay! =)