Difference between revisions of "Clipboard"
Kynikos.bot (talk | contribs) (remove language suffix from Category:X Server (English), see Talk:Table of Contents#English Category Names: Capitalization and Conflict with i18n) |
Brottweiler (talk | contribs) m (→List of clipboard managers: Added link to Greenclip page) |
||
(87 intermediate revisions by 39 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:X | + | [[Category:X server]] |
[[fr:Copier coller]] | [[fr:Copier coller]] | ||
− | + | [[ja:クリップボード]] | |
− | ==History== | + | From [[Wikipedia:Clipboard (computing)]]: |
+ | :The clipboard is a facility used for short-term data storage and/or data transfer between documents or applications, via [[Wikipedia:copy and paste|copy and paste]] operations. | ||
+ | |||
+ | == History == | ||
+ | |||
In X10, "cut buffers" were introduced. These were limited buffers that stored arbitrary text and were used by most applications. However, they were inefficient and implementation of them varied, so selections were introduced. Cut buffers are long deprecated, and although some applications (such as xterm) may have legacy support for them, it is both not likely and not recommended that they be used. | In X10, "cut buffers" were introduced. These were limited buffers that stored arbitrary text and were used by most applications. However, they were inefficient and implementation of them varied, so selections were introduced. Cut buffers are long deprecated, and although some applications (such as xterm) may have legacy support for them, it is both not likely and not recommended that they be used. | ||
− | ==Background== | + | == Background == |
− | The ICCCM (Inter-Client Communication Conventions Manual) standard defines three "selections": PRIMARY, SECONDARY, and CLIPBOARD. Despite the naming, all three are basically "clipboards". Rather than the old "cut buffers" system where arbitrary applications could modify data stored in the cut buffers, only one application may control or "own" a selection at one time. This prevents inconsistencies in the operation of the selections. | + | |
+ | The [https://tronche.com/gui/x/icccm/ ICCCM] (Inter-Client Communication Conventions Manual) standard defines three "selections": PRIMARY, SECONDARY, and CLIPBOARD. Despite the naming, all three are basically "clipboards". Rather than the old "cut buffers" system where arbitrary applications could modify data stored in the cut buffers, only one application may control or "own" a selection at one time. This prevents inconsistencies in the operation of the selections. | ||
+ | |||
+ | Of the three selections, users should only be concerned with PRIMARY and CLIPBOARD. SECONDARY is only used inconsistently and was intended as an alternate to PRIMARY. The majority of programs for Xorg, including [[Qt]] and [[GTK+]] applications, treat the the PRIMARY and CLIPBOARD selections in the [https://specifications.freedesktop.org/clipboards-spec/clipboards-latest.txt following way]: | ||
+ | |||
+ | * The CLIPBOARD selection is used for explicit copy/paste commands involving keyboard shortcuts or menu items. Hence, it behaves like the single-clipboard system on Windows. Unlike PRIMARY, it can also handle [https://stackoverflow.com/questions/3571179/how-does-x11-clipboard-handle-multiple-data-formats multiple data formats]. | ||
+ | * The PRIMARY selection is used for the currently selected text, even if it is not explicitly copied, and for middle-mouse-click pasting. In some cases, pasting is also possible with a keyboard shortcut. | ||
+ | |||
+ | See the [[Keyboard shortcuts]] page which lists the default shortcuts in many programs. | ||
+ | |||
+ | It is also important to realize that according to the selection protocols, nothing is copied anywhere [https://unix.stackexchange.com/questions/213840/how-to-toggle-or-turn-off-text-selection-being-sent-to-the-clipboard/213843#213843 until it is pasted]. For example, if you select some word in a terminal window, close the terminal and then want to paste it somewhere else, it will not work because the terminal is gone and the text has not been copied anywhere. | ||
+ | |||
+ | {{Note|[[#List of clipboard managers|Clipboard managers]] can significantly change the user experience, for example they might synchronize the PRIMARY and CLIPBOARD selections to emulate a single-clipboard system.}} | ||
+ | |||
+ | == Application specific notes == | ||
+ | |||
+ | === CLIPBOARD in vim === | ||
+ | See [[Vim#Clipboard]]. | ||
+ | |||
+ | === Disable paste on middle mouse click === | ||
+ | |||
+ | Currently the only simple way to completely disable pasting with the middle mouse button across all applications is to disable the middle mouse button, which then also loses its other functions such as closing tabs. The applications listed below have specific settings to disable it. | ||
+ | |||
+ | ==== Firefox ==== | ||
+ | To stop firefox from acting on middle mouse clicks, set the following options in {{ic|about:config}}. | ||
+ | {{hc|about:config| | ||
+ | middlemouse.contentLoadURL false | ||
+ | middlemouse.paste false | ||
+ | }} | ||
+ | |||
+ | ==== GTK ==== | ||
+ | {{hc|.config/gtk-3.0|<nowiki> | ||
+ | gtk-enable-primary-paste=false | ||
+ | </nowiki>}} | ||
− | + | == List of clipboard managers == | |
− | + | Clipboard managers are applications that enable users to manipulate the clipboard. Note that many of these programs can also synchronize the previously mentioned clipboards. | |
− | |||
− | + | * {{App|Anamnesis|Clipboard manager that stores all the clipboard history and offers an interface to do a full-text search. It has both a command line and GUI mode available.|http://anamnesis.sourceforge.net/|{{AUR|anamnesis}}}} | |
+ | * {{App|Autocutsel|Command line and daemon interfaces to synchronize PRIMARY, {{Ic|CLIPBOARD}} and cut buffer selections.|http://www.nongnu.org/autocutsel/|{{Pkg|autocutsel}}}} | ||
+ | * {{App|Clipboard Indicator|Clipboard manager extension for GNOME Shell. Adds a clipboard indicator to the top panel, and caches clipboard history.|https://extensions.gnome.org/extension/779/clipboard-indicator/|https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator}} | ||
+ | * {{App|ClipIt|Fork of Parcellite.It has both a command line and GUI mode available.|https://sourceforge.net/projects/gtkclipit/|{{AUR|clipit}}}} | ||
+ | * {{App|Clipman|A clipboard manager for Xfce. It keeps the clipboard contents around while it is usually lost when you close an application. It is able to handle text and images, and has a feature to execute actions on specific text selections by matching them against regular expressions.|https://goodies.xfce.org/projects/panel-plugins/xfce4-clipman-plugin|{{Pkg|xfce4-clipman-plugin}}}} | ||
+ | * {{App|ClipManager|Cross-platform clipboard manager written in Python and Qt.|https://github.com/scottwernervt/clipmanager|{{AUR|clipmanager}}}} | ||
+ | * {{App|Clipmenu|Dmenu based clipboard manager|https://github.com/cdown/clipmenu/|{{AUR|clipmenu}}}} | ||
+ | * {{App|Clipster|A lightweight, command-line-driven clipboard manager, written in Python.|https://github.com/mrichar1/clipster|{{AUR|clipster-git}}}} | ||
+ | * {{App|CopyQ|Clever clipboard manager with searchable and editable history, custom actions on items and command line support.|https://github.com/hluk/CopyQ|{{AUR|copyq}}}} | ||
+ | * {{App|[[Wikipedia:Glipper|Glipper]]|Clipboard manager for the GNOME desktop with many features and plugin support.|https://launchpad.net/glipper|{{AUR|glipper}}}} | ||
+ | * {{App|GPaste|Clipboard management system that aims at being a new generation Parcellite, with a modular structure split in a couple of libraries and a daemon for adaptability. Offers a GNOME Shell extension and a CLI interface.|https://github.com/Keruspe/GPaste|{{Pkg|gpaste}}}} | ||
+ | * {{App|[[Greenclip]]|Simple clipboard manager to be integrated with rofi|https://github.com/erebe/greenclip|{{AUR|rofi-greenclip}}}} | ||
+ | * {{App|Keepboard|Cross-platform clipboard manager. Saves text, image and file clipboard items. |https://sourceforge.net/projects/keepboard/|}} | ||
+ | * {{App|[[Wikipedia:Klipper|Klipper]]|Full featured clipboard manager for the KDE desktop.|https://userbase.kde.org/Klipper|{{Pkg|plasma-workspace}}}} | ||
+ | * {{App|Parcellite|Lightweight yet feature-rich clipboard manager. It has both a command line and GUI mode available.|http://parcellite.sourceforge.net/|{{Pkg|parcellite}}}} | ||
+ | * {{App|Pasteall|Clipboard monitor simple and functional (with notifications in Portuguese).|https://github.com/ShyPixie/Pasteall|{{AUR|pasteall}}}} | ||
+ | * {{App|Qlipper|Lightweight and cross-platform clipboard history applet based on Qt.|https://github.com/pvanek/qlipper/|{{AUR|qlipper}}}} | ||
+ | * {{App|Xclip|A lightweight, command-line based interface to the clipboard.|https://github.com/astrand/xclip|{{Pkg|xclip}}}} | ||
+ | * {{App|xcmenu|Clipboard synchronizer developed for window manager users.|https://github.com/dindon-sournois/xcmenu|{{AUR|xcmenu-git}}}} | ||
+ | * {{App|xsel|Command-line program for getting and setting the contents of the X selection.|http://www.vergenet.net/~conrad/software/xsel/|{{Pkg|xsel}}}} | ||
− | + | == See also == | |
− | *[ | + | * [https://specifications.freedesktop.org/clipboards-spec/clipboards-latest.txt Cut-and-paste in X] |
+ | * [https://www.jwz.org/doc/x-cut-and-paste.html X Selections, Cut Buffers, and Kill Rings.] |
Latest revision as of 20:33, 22 April 2018
From Wikipedia:Clipboard (computing):
- The clipboard is a facility used for short-term data storage and/or data transfer between documents or applications, via copy and paste operations.
Contents
History
In X10, "cut buffers" were introduced. These were limited buffers that stored arbitrary text and were used by most applications. However, they were inefficient and implementation of them varied, so selections were introduced. Cut buffers are long deprecated, and although some applications (such as xterm) may have legacy support for them, it is both not likely and not recommended that they be used.
Background
The ICCCM (Inter-Client Communication Conventions Manual) standard defines three "selections": PRIMARY, SECONDARY, and CLIPBOARD. Despite the naming, all three are basically "clipboards". Rather than the old "cut buffers" system where arbitrary applications could modify data stored in the cut buffers, only one application may control or "own" a selection at one time. This prevents inconsistencies in the operation of the selections.
Of the three selections, users should only be concerned with PRIMARY and CLIPBOARD. SECONDARY is only used inconsistently and was intended as an alternate to PRIMARY. The majority of programs for Xorg, including Qt and GTK+ applications, treat the the PRIMARY and CLIPBOARD selections in the following way:
- The CLIPBOARD selection is used for explicit copy/paste commands involving keyboard shortcuts or menu items. Hence, it behaves like the single-clipboard system on Windows. Unlike PRIMARY, it can also handle multiple data formats.
- The PRIMARY selection is used for the currently selected text, even if it is not explicitly copied, and for middle-mouse-click pasting. In some cases, pasting is also possible with a keyboard shortcut.
See the Keyboard shortcuts page which lists the default shortcuts in many programs.
It is also important to realize that according to the selection protocols, nothing is copied anywhere until it is pasted. For example, if you select some word in a terminal window, close the terminal and then want to paste it somewhere else, it will not work because the terminal is gone and the text has not been copied anywhere.
Application specific notes
CLIPBOARD in vim
See Vim#Clipboard.
Disable paste on middle mouse click
Currently the only simple way to completely disable pasting with the middle mouse button across all applications is to disable the middle mouse button, which then also loses its other functions such as closing tabs. The applications listed below have specific settings to disable it.
Firefox
To stop firefox from acting on middle mouse clicks, set the following options in about:config
.
about:config
middlemouse.contentLoadURL false middlemouse.paste false
GTK
.config/gtk-3.0
gtk-enable-primary-paste=false
List of clipboard managers
Clipboard managers are applications that enable users to manipulate the clipboard. Note that many of these programs can also synchronize the previously mentioned clipboards.
- Anamnesis — Clipboard manager that stores all the clipboard history and offers an interface to do a full-text search. It has both a command line and GUI mode available.
- Autocutsel — Command line and daemon interfaces to synchronize PRIMARY,
CLIPBOARD
and cut buffer selections.
- Clipboard Indicator — Clipboard manager extension for GNOME Shell. Adds a clipboard indicator to the top panel, and caches clipboard history.
- https://extensions.gnome.org/extension/779/clipboard-indicator/ || https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator
- ClipIt — Fork of Parcellite.It has both a command line and GUI mode available.
- Clipman — A clipboard manager for Xfce. It keeps the clipboard contents around while it is usually lost when you close an application. It is able to handle text and images, and has a feature to execute actions on specific text selections by matching them against regular expressions.
- ClipManager — Cross-platform clipboard manager written in Python and Qt.
- Clipmenu — Dmenu based clipboard manager
- Clipster — A lightweight, command-line-driven clipboard manager, written in Python.
- CopyQ — Clever clipboard manager with searchable and editable history, custom actions on items and command line support.
- Glipper — Clipboard manager for the GNOME desktop with many features and plugin support.
- GPaste — Clipboard management system that aims at being a new generation Parcellite, with a modular structure split in a couple of libraries and a daemon for adaptability. Offers a GNOME Shell extension and a CLI interface.
- Greenclip — Simple clipboard manager to be integrated with rofi
- Keepboard — Cross-platform clipboard manager. Saves text, image and file clipboard items.
- Klipper — Full featured clipboard manager for the KDE desktop.
- Parcellite — Lightweight yet feature-rich clipboard manager. It has both a command line and GUI mode available.
- Pasteall — Clipboard monitor simple and functional (with notifications in Portuguese).
- Qlipper — Lightweight and cross-platform clipboard history applet based on Qt.
- Xclip — A lightweight, command-line based interface to the clipboard.
- xcmenu — Clipboard synchronizer developed for window manager users.
- xsel — Command-line program for getting and setting the contents of the X selection.