Recommended Clipboard Management Tool: Clipcat
I've used many clipboard management tools in Linux, including CopyQ, Clipman + WoFi, Diodon, and Xclip. CopyQ is a crash king, frequently crashing the program (though it does have its advantages, like configurable delete shortcuts, such as "d" to delete a history entry, similar to vi). Clipman + WoFi has been used for a long time without any major issues, but the configuration is a bit complicated. The others just don't seem as good as I thought.
A few days ago, I discovered clipcat, a clipboard software written in Rust. It's quite good, works directly with rofi, and its built-in command-line tools have clear logic (which I'll discuss below).
1. Installation
I currently use Arch, and I'm pretty hands-on. Anything that's in the repository is generally reliable and has some serious features. I'm happy to use new versions every day.
After all, the world is always changing. Regarding AMDVLK Open, which I mentioned in my previous article, I didn't expect AMD to come to their senses a while ago and stop working on it themselves, focusing their resources on developing RADV with the community. This is great news.
1sudo pacman -S clipcat```
2I haven't tested other distributions. The official repository says it supports macOS, but I'm not sure how well it works. Windows probably doesn't support it.
3
4I use Linux every day and have no motivation to switch operating systems.
5
6### 2. Configuration
7After the package is installed, four command-line tools will be provided:
8
9- clipcatctl (clipcat client control program)
10- clipcatd (clipcat server)
11- clipcat-menu (interacts with the built-in or external finder)
12- clipcat-notify (clipboard monitoring tool)
13
14The logic is clear and standard, and it's obvious that the author understands Linux. Some may wonder if four subcommands for a clipboard tool are too complex. Actually, it's not. The configuration you need is very simple, and each subcommand performs its own function.
15
16Generate the default configuration file:
17
18```shell
19mkdir -p $XDG_CONFIG_HOME/clipcat
20clipcatd default-config > $XDG_CONFIG_HOME/clipcat/clipcatd.toml
21clipcatctl default-config > $XDG_CONFIG_HOME/clipcat/clipcatctl.toml
22clipcat-menu default-config > $XDG_CONFIG_HOME/clipcat/clipcat-menu.toml
The $XDG_CONFIG_HOME environment variable is typically the .config
file in the user's home directory. The default configuration generally does not need to be modified.
- Set up startup:
1➜ cat ~/.config/systemd/user/clipcat.service
2[Unit]
3Description=Clipcat Daemon for labwc
4After=graphical-session.target
5Wants=graphical-session.target
6
7[Install]
8WantedBy=default.target
9
10[Service]
11# NOTE: We assume that your `clipcatd` is located at `/usr/bin/clipcatd`.
12ExecStartPre=/bin/rm -f %t/clipcat/grpc.sock
13ExecStart=/usr/bin/clipcatd --no-daemon --replace
14Restart=on-failure
15Type=simple
16
17➜ grep -A3 -B3 clipcat .config/labwc/autostart
18#clipman
19# wl-paste -t text --watch clipman store > /dev/null 2>&1 &
20
21# clipcat
22systemctl --user start clipcat.service
23
24# Enable notifications. Typically, GNOME/KDE application notifications go
25# Use the org.freedesktop.Notifications D-Bus API and require a client such as this
This means using the systemd configuration file and then starting it via labwc's autostart. Because using labwc is a bit of a hassle, I didn't start it directly with systemd (there were some issues with the startup order of notification components, and I didn't want to waste too much time troubleshooting). For a mature desktop environment, starting it directly with systemd from the official repository should work without any problems.
- Configure shortcut keys
See the configuration directly:
1➜ ~ grep -A1 -B1 clipcat .config/labwc/rc.xml
2<keybind key="C-semicolon">
3<action name="Execute" command="clipcat-menu"/>
4</keybind>
5<keybind key="W-r">
6<action name="Execute" command="clipcat-menu remove"/>
7</keybind>
Press Ctrl + ;
to trigger the clipcat-menu related commands and pop up the Finder. If you have rofi installed, rofi will pop up by default to display candidate target entries. Press Win + r
to delete the entry.
3. Using Screenshots
Example
1➜ clipcat-notify
2{
3"clipboard_kind": "Secondary",
4"mime": "text/plain;charset=utf-8",
5"timestamp": "2025-09-23T14:08:41.002047903+08:00"
6}⏎
7➜ clipcatctl list
871dd4a1351d227c2: ➜ ~ clipcat-notify\n{\n "clipboard_kind": "Secondary",\n "mime": "text/plain;charset=utf...(6 lines)
983dc07228086d2b1: ➜ ~ grep -A1 -B1 clipcat .config/labwc/rc.xml\n <keybind key="C-semicolon">\n <ac...(7 lines)
104ddec13ce4e41226: 、Use\n
11a7590a35e18f9812: ➜ ~ grep -A3 -B3 clipcat .config/labwc/autostart\n# clipman\n# wl-paste -t text --watch ...(9 lines)
125086cda61d3968d0: ➜ ~ cat ~/.config/systemd/user/clipcat.service\n[Unit]\nDescription=Clipcat Daemon for l...(15 lines)
1398b78567ca66783a: If you don't set
1410ae2a59320ab394: $XDG_CONFIG_HOME
To select text or copy it, press Ctrl + ;
The rofi candidate page pops up, as shown below:
Supports blur filtering, and the delete operation is similar. I'm too lazy to take a screenshot. Editing is also supported, but the chances of editing are very low, so I'll ignore it.
4. Other
When discussing clipboard management software, it's important to mention the differences between the three types of clipboards (Primary, Secondary, and Clipboard).
Requirement Scenarios | Recommended Clipboard | Operation Method |
---|---|---|
Temporary Quick Copy of Text (e.g., Terminal) | Primary | Select Text → Middle Mouse Button / Shift+Insert to Paste |
Universal Copy Across Applications (e.g., Documents/Images) | Clipboard | Ctrl+C to Copy → Ctrl+V to Paste |
Multiple Clipboard Requirements for Professional Software | Secondary | Relying on Custom Software Operations (Rarely Used) |
If you don't want to read further, refer to the table above. If you're interested and patient, please continue reading. The AI answers are as follows.
- Primary Clipboard: Linux's unique "Instant Clipboard"
Primary is one of the earliest clipboards designed for the X Window System. Its core purpose is "instant, temporary text exchange." Built entirely for efficiency, it's also where the Linux and Windows/macOS clipboard logic differs most.
1Core Logic:
2
3When you drag and select any text (such as commands in a terminal or code in an editor), the system automatically saves the selected content to Primary, eliminating the need to press any "copy" shortcuts (such as Ctrl+C).
4
5To paste, simply click the middle mouse button (or press Shift+Insert) at the target location to paste the content from Primary.
6
7Typical Scenario:
8
9Select a command in a terminal and paste it in another terminal window by clicking the middle mouse button, eliminating the need to press Ctrl+C or Ctrl+V.
10Select text in a text editor and quickly paste it into a browser address bar or chat window.
11
12Temporarily copy small amounts of content (such as file names or variable names) without worrying about overwriting previously copied content.
13
14Notes:
15Primary data is "overwritten": newly selected text directly replaces the existing content in the Primary.
16
17Data is not persistent: Closing the program storing the Primary content (such as closing the terminal containing the selected text) may clear the data in the Primary.
18
19Text only: In most cases, the Primary clipboard only stores plain text and does not support binary data such as images or files.
- Secondary Clipboard: "Niche Backup Clipboard"
The Secondary clipboard is also defined by the X Window System, but is positioned as a "program-specific backup swap area." Its original design was to provide professional software with "multiple clipboards in parallel," but its practicality is relatively low and has been gradually neglected.
1Core Logic:
2The Secondary clipboard does not support "auto-fill selected text" and must be actively called by the program. Data can only be written to the secondary clipboard using the system interface (for example, some professional text editors offer a "Copy to Secondary Clipboard" option).
3Pasting also requires the program to actively read the secondary data. There is no unified system-level shortcut key (software customization is required, such as using Ctrl+Shift+V to paste the contents of the Secondary file).
4Typical Scenarios:
5
6Used only in a few specialized tools, for example:
7
8Some CAD software uses the Secondary file to store "auxiliary annotation text" separate from the "main content" of the Primary file;
9
10Early text editors (such as Emacs) supported using the Secondary file to temporarily store "backup fragments" to avoid overwriting the Primary file.
11
12Notes:
13
14Very low support: Over 90% of modern Linux programs (such as browsers, office software, and terminals) do not support Secondary files at all and cannot write or read data from them.
15
16Functionality: The need for multiple clipboards has been replaced by the "history" feature of clipboard management tools (such as clipcat and CopyQ), making the Secondary file almost a "historical relic."
- Clipboard (Standard Clipboard): A "Universal Clipboard" Compatible Across Systems
Clipboard is designed to be compatible with the clipboard logic of systems like Windows. Its core focus is universal, persistent data exchange across applications. It is also the clipboard most users are most familiar with (commonly known as the "Ctrl+C/Ctrl+V clipboard").
1Core Logic:
2Data can only be written by actively triggering a "copy" operation: for example, pressing Ctrl+C, selecting "Copy" from the right-click menu, or clicking the "Copy" button in the menu.
3Paste requires an active "paste" operation: for example, pressing Ctrl+V, selecting "Paste" from the right-click menu, or Ctrl+Shift+V (in some terminals). Typical scenarios:
4
5Copying web content from a browser and pasting it into a Word/LibreOffice document;
6Copying an image (such as a screenshot or local image) and pasting it into a chat app or image editor;
7Copying a file (such as selecting the file in a file manager and pressing Ctrl+C) and pasting it into another folder (essentially transferring the file path).
8
9Points to Note:
10
11Data Persistence: Data in the Clipboard remains until you perform a new "Copy" operation (overwriting the original data), and it persists even after closing the source program (for example, if you copy text in a browser and then close the browser, you can still paste it).
12
13Multiple Data Type Support: In addition to plain text, it can also store multiple MIME types, such as images, HTML, file paths, and rich text (such as formatted text). The program automatically selects the appropriate format for pasting based on the target scenario (for example, if you copy text from a webpage into Notepad, HTML formatting will be automatically removed, leaving the plain text).
14
15Cross-System Compatibility: Content copied via the Clipboard in Linux can be pasted into Windows programs running in Wine, and vice versa. Wayland desktops (such as GNOME 40+ and KDE Plasma 5+) are also fully compatible with the Clipboard logic.
Wayland fully preserves the definitions of the three clipboard types: primary, secondary, and Clipboard, and their behavior is consistent with that of X Window.
In short, ordinary users have few opportunities to explicitly come into contact with Secondary. Clipboard is universal for the three mainstream operating systems, while Primary is a Linux feature.
Copyright statement:
- All content that is not sourced is original., please do not reprint without authorization (because the typesetting is often disordered after reprinting, the content is uncontrollable, and cannot be continuously updated, etc.);
- For non-profit purposes, to deduce any content of this blog, please give the relevant webpage address of this site in the form of 'source of original text' or 'reference link' (for the convenience of readers).
See Also:
- WeChat Mini Program Development Notes
- Solve the problem that VSCode cannot input Chinese under Arch
- Mini console assembly notes
- Greetd and greetd tutorial
- My Toolbox
- A Brief Introduction to Scientific Internet Access with Xray
- How to Smoothly Connect to Bluetooth Devices in Arch Linux
- Gif screen recording in Wayland environment
- Summary of How to Install Chrome in Ubuntu
- Install the latest version of Python for Linux