astrand / xclip

Command line interface to the X11 clipboard
GNU General Public License v2.0
1.03k stars 73 forks source link

Custom selections (in respect to ICCCM 2.6.1) #143

Open schrmh opened 1 year ago

schrmh commented 1 year ago

Currently, xclip only allows to copy to and paste from the three standard selections. However, ICCCM 2.6.1 mentions that more selections can exist:

There can be an arbitrary number of selections, each named by an atom. To conform with the inter-client conventions, however, clients need deal with only these three selections:

PRIMARY SECONDARY CLIPBOARD

Other selections may be used freely for private communication among related groups of clients.

(https://tronche.com/gui/x/icccm/sec-2.html#s-2.6.1)

I wish for xclip to support selections of custom names.

This blog post might help a bit: https://www.uninformativ.de/blog/postings/2017-04-02/0/POSTING-en.html