Clipboard
Contents
Specification
According to Freedesktop.org Specification:
There are three standard selections defined in the ICCCM: PRIMARY, SECONDARY, and CLIPBOARD.
- use PRIMARY for mouse selection, middle mouse button paste, and explicit cut/copy/paste menu items (Qt 2, GNU Emacs 20)
- use CLIPBOARD for the Windows-style cut/copy/paste menu items;
- no one ever does anything interesting with SECONDARY as far as I can tell.
- More information about target atoms : ICCCM section 2.6.2
CLI Clipboard interfaces
xclip
- Website
- package: xclip
Primary
- Print content: xclip -out
- Set content: echo test | xclip
Clipboard
- Print content: xclip -out -selection clipboard
- Set content: printf test | xclip -selection clipboard
With binary data: maim -s | xclip -selection clipboard -t image/png
xsel
- Website
- package: xsel
Primary
- Print content: xsel
- Set content: printf test | xsel --input
Clipboard
- Print content: xsel --clipboard
- Set content: printf test | xsel --clipboard --input
clipit
Lightweight GTK+ clipboard manager (fork of Parcellite)
- Website
- package: clipit
Primary
- Print content: clipit -p
- Set content: /
Clipboard
- Print content: clipit -c
- Set content: echo "copied to clipboard" | clipit or clipit "copied to clipboard"
Clipboard managers
- Clipman : Xfce default pluging
- Diodon
- Klipper : Kde manager
- GPaste
- clipit (in daemon mode)