From ArchWiki

This article or section needs expansion.

Reason: Describe clipboards for Wayland and Xwayland. Some references: [1], [2], [3]. (Discuss in Talk:Clipboard)

According to Wikipedia:

The clipboard is a facility used for short-term data storage and/or data transfer between documents or applications, via copy and paste operations.


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.

Selections describes the two main selections as follows:[4]

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.
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 majority of programs for Xorg, including Qt and GTK applications, follow this behavior. While ICCCM also defines a SECONDARY selection, it does not have a consensually agreed upon purpose. Despite the naming, all three selections 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.

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 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. If you want the word to be preserved after closing terminal window, consider installing a clipboard manager.

Note: Clipboard managers can significantly change the user experience, for example they might synchronize the PRIMARY and CLIPBOARD selections to emulate a single-clipboard system.

Disabling middle-click paste

The following disables the middle-click pasting behavior by automatically clearing PRIMARY, without disabling the middle-click button or altering its other functionalities (like opening in a new tab or scrolling).


Using sxhkd

Using sxhkd, add the following to the configuration file:

    ;echo -n | xclip -in

The command makes use of xclip. See sxhkd#Usage for configuring sxhkd to autostart.

Using xsel

Run the script

while true; do
    xsel -fin </dev/null



This section lists command-line tools to manipulate the clipboards.

  • sselp — Simple X selection printer. Prints the X selection to stdout. || sselpAUR
  • xclip — A lightweight, command-line based interface to the clipboard. || xclip
  • xsel — Command-line program for getting and setting the contents of the X selection. || xsel
  • wl-clipboard — A simple copy/paste tool for Wayland compositors. || wl-clipboard
Tip: Clipboards on Wayland can be synchronized with wl-clipboard using wl-paste -pw wl-copy.


This section lists clipboard managers which provide additional features such as clipboard history or synchronization.

  • 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. || anamnesisAUR
  • Autocutsel — Command line and daemon interfaces to synchronize PRIMARY, CLIPBOARD and cut buffer selections. || autocutselAUR
  • Clipboard — Easy-to-use clipboard manager for terminals with multiple different clipboards, persistent clipboards, and regex selection. || clipboardAUR
  • Clipboard Indicator — Clipboard manager extension for GNOME Shell. Adds a clipboard indicator to the top panel, and caches clipboard history. || gnome-shell-extension-clipboard-indicator-gitAUR
  • Clipcat — Clipboard manager written in Rust which allows user to select clipboard history from application launchers such as dmenu, rofi. || clipcat
  • cliphist — wayland clipboard manager with support for multimedia. || cliphist
  • ClipIt — Fork of Parcellite. It has both a command line and GUI mode available. || clipitAUR
  • Clipman — Clipboard manager plugin for the Xfce4 panel. 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. || xfce4-clipman-plugin
  • Clipmenu — Dmenu based clipboard manager || clipmenu
  • Clipmon — A lightweight clipboard manager for Wayland. Intended as a monitoring tool that will send a notification when an application pastes from the clipboard on its own (this feature is a work in progress). || clipmon-gitAUR
  • clipsim — Simple and fast X clipboard manager written in C. || clipsim-gitAUR
  • Clipster — A lightweight, command-line-driven clipboard manager, written in Python. || clipsterAUR
  • Clipton — Clipboard manager with a Rofi frontend. || clipton-gitAUR
  • CopyQ — Clever Qt clipboard manager with searchable and editable history, custom actions on items and command line support. || copyq
  • Gnome Clipboard History — Gnome Clipboard History is a clipboard manager GNOME extension that saves what you've copied into an easily accessible, searchable history panel. || gnome-shell-extension-clipboard-historyAUR
  • 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. || gpaste
  • Greenclip — Simple clipboard manager to be integrated with rofi || rofi-greenclipAUR
  • Klipper — Full featured clipboard manager for the KDE desktop. || plasma-workspace
  • Parcellite — Lightweight yet feature-rich clipboard manager. It has both a command line and GUI mode available. || parcellite
  • Qlipper — Lightweight and cross-platform clipboard history applet based on Qt. || qlipperAUR
  • xclipboard — Official X clipboard command-line client. || xorg-xclipboard
  • xcmenu — Clipboard synchronizer developed for window manager users. || xcmenu-gitAUR

See also