- KDE's clipboard manager (formerly Klipper) offers extended history, search, and favorites for text and images.
- Klipper actions use regular expressions and external commands to react to copied content.
- It is possible to create rules to clean formatting, open specific URLs, or launch programs based on paths or links.
- It is advisable to adjust history size, shortcuts, and security options to balance convenience and data protection.
If you use Plasma daily, you'll soon discover that the KDE clipboard is much more than just copy and paste . Behind that discreet system tray icon lies a powerful tool that saves histories, manages selections, and, most importantly, allows you to create custom actions that are triggered by what you copy.
In this article, we'll take an in-depth look at how the clipboard manager (formerly Klipper) works, how to configure its actions, what you can do with them, and some tips for better integrating it into your workflow. The goal is for you to end up with a clear guide to creating your own actions in KDE Klipper and making the most of your clipboard history without getting overwhelmed by the options.
What exactly is Klipper in KDE Plasma?
Klipper was for years KDE's clipboard application , a small utility that ran in the background and allowed you to store more than one item in memory. With Plasma 5 and, especially, Plasma 6, this classic Klipper was integrated as a widget or applet in the panel , losing its name for the user but retaining its functions and some of its internal workings.
In practice, when we talk about Klipper today we are talking about Plasma's clipboard manager : the folder-shaped icon (or similar depending on the theme) that appears in the system tray and, when clicked, shows a history of the last things you copied or selected, including text, images, and links.
This manager relies on two copying mechanisms in Linux: the classic Ctrl+C and Ctrl+V clipboard , and primary selection , which works by simply selecting text with the mouse and pasting it with the middle button. The interesting thing is that Plasma allows both to coexist without overlapping, so you can have your latest copy and your latest selection available simultaneously.
The best part is that, in addition to saving this history, the clipboard widget adds extra features like search, editing, quick deletion, and pinning frequently used items . This makes it a kind of "floating notepad" that saves what you use without you having to think about it explicitly.
As if that weren't enough, KDE's clipboard manager allows you to apply contextual actions based on the copied content . And this is where Klipper's most powerful (and also most confusing) feature comes into play: actions based on regular expressions and external commands.
Where is the clipboard in KDE and how do I use it?
Plasma's clipboard manager is always visible in the system tray , unless your clipboard is completely empty and your theme hides it until it's filled. You'll usually see a folder or clipboard icon; hovering over it typically displays the last item in the history as a preview.
If you left-click on the icon, a list appears with the latest entries: text snippets, images, file paths, URLs, emojis … everything that passes through the clipboard. From this small window, you can select any old entry and paste it wherever you want, as if you had just copied it.
Hovering your pointer over a history entry will display several action icons: one to trigger associated actions , another to display a barcode with the content, another to edit the text, and another to delete the entry. This, along with the search box at the top, makes finding and reusing old snippets incredibly fast , even when handling hundreds of copies daily.
If you don't like using the mouse, you can open the clipboard menu directly with a keyboard shortcut: by default it's usually Ctrl+Alt+V , although you can change it in the KDE shortcut settings by looking for something like "Show clipboard popup menu" or "Show Klipper popup menu".
In addition to being a tray icon, the clipboard manager can be added as an applet to the panel (Kicker or other panels) . To do this, simply right-click on the panel, choose "Add Graphical Elements" or "Add Applets to Panel," find the clipboard applet, and add it. It's essentially the same component; only the placement changes.
Basic clipboard configuration options
To access the preferences, simply right-click on the clipboard icon in the system tray and select "Configure Clipboard..." (or very similar text, depending on your Plasma version). A window with several tabs will open, the most important being "General" and "Actions".
In the General section, you'll find settings like the history size , which is usually quite modest by default (20 entries or so). Unless you have a very old computer, it's a good idea to increase that limit; many users leave it at hundreds or even close to 1000 items , because it takes up very little space and gives you a lot of flexibility when retrieving things.
You'll also see a checkbox related to "Selection and Clipboard ," which controls whether direct selections (what you select with the mouse) are added to the history along with normal copies. This option's default value has changed depending on the Plasma version, but it's generally worth leaving it checked to take full advantage of the intermediate copying typical of X11 or Wayland.
There are other minor options: saving clipboard contents upon logging out, ignoring images, clearing history upon exiting, etc. All of these allow you to customize the behavior to your liking, but what has the greatest impact on daily use is the number of entries and the combined handling of selection and clipboard.
Recent versions of Plasma have also added features like clipboard favorites . You can bookmark frequently used snippets (email addresses, templates, common emojis, etc.) and have them readily available, easily filtered with the search bar. It's a very convenient way to avoid digging through lengthy clipboard histories.
Clipboard actions: what they are and why they're worth it
Beyond simply saving what you copy, the KDE clipboard offers a system of automatic or manual actions that are triggered when the content matches a pattern. This pattern is defined using regular expressions , and the result of the action is usually to execute a command, open a program, or modify the contents of the clipboard.
The beauty of it is that these actions can be contextual . For example, when you copy a URL, the clipboard might suggest opening it with your favorite browser, video player, or a specific tool. If you copy a path to a PDF file, it might suggest opening it directly with the corresponding viewer. All of this without you having to type paths or launch programs manually.
To enable this system, check the box “ Enable clipboard actions ” in the widget's menu. Once activated, when you copy something that matches one of the defined rules, a small pop-up menu will appear with the available actions for that content.
This menu can recognize local file paths, resources on remote servers, "normal" URLs, or specific addresses (for example, from YouTube or Vimeo) and suggest the appropriate application to open them. It's a very convenient way to save clicks and keyboard shortcuts on repetitive tasks.
The best part is that you're not limited to the default actions: you can create your own rules so that, for example, any YouTube link is sent to an external player , or to run a script that cleans the formatting of a text, or to process data with a command-line tool.
Creating your own stocks in KDE Klipper step by step
Klipper's action dialog can seem a bit cryptic at first glance, especially since it doesn't offer much contextual help and online documentation is scarce. However, with a few steps you'll get the hang of it and be able to configure something very useful.
To create a new action, follow a sequence similar to this: right-click on the clipboard icon → “Configure clipboard…” → “Actions” tab . There you will see a list of predefined rules and buttons to add, edit, or delete.
Use the "Add action" button to create a new one. A small form will open where the most important field is the regular expression , which determines which clipboard contents will trigger this action. If you want it to apply to any text, you can enter something as generic as .* , which means "any string of characters."
In that same window, you'll find a checkbox labeled " Automatic ." If you uncheck it, the action won't run automatically; you'll have to manually invoke it from the clipboard menu (useful for actions you don't want to constantly interrupt). If you leave it checked, the system will display a menu each time the content matches the regular expression, allowing you to choose whether to execute the associated command.
Another important section is " Output Handling ." Here you decide what to do with the result of the command that triggers the action. A very common option is "Replace Clipboard," which takes the command's standard output and saves it directly as new clipboard content, ready to paste.
Finally, within the action, you have an area to add commands . You can include several, each with its description and actual command. This is where the syntax with %s comes into play , which represents the current contents of the clipboard and can be inserted as an argument to the command you want to execute.
Example 1: Clean text formatting with a Klipper action
A classic feature many users look for is the ability to paste plain text in Plasma, regardless of the application. Under X11, this can be achieved with tools like xclip , and Klipper allows for a similar functionality to be integrated into the clipboard.
The problem is that, if you don't know what to put in the "Command" field, you may encounter absurd results: for example, the clipboard may end up containing only a word like "komento" (or "command"), which usually indicates that the execution has failed and an error message has been dumped instead of the expected output.
To set up a "paste without formatting" action, you can create a regular expression rule (.*) , marked as non-automatic, and in the command section use something like a filter that retrieves the text from the clipboard, passes it through a tool that removes the formatting, and then returns it to the clipboard. The idea is that the command reads from standard input or %s and writes plain text to standard output , which Klipper will then capture to replace the content.
Depending on your environment and whether you're working with X11 or Wayland, you can use utilities like xclip, wl-clipboard, or other command-line tools . In any case, the pattern is the same: the command must be executable from the shell, accept quoted text or text via stdin, and return clean text.
The key here is understanding that Klipper, in the "Command" field, expects a command exactly as you would type it in a terminal , not a path to an arbitrary script without permissions or arguments. If you use an external script, make sure it has execute permissions and that you invoke it with the correct path, for example, "/home/user/bin/myscript.sh "%s"".
Example 2: Opening YouTube or Vimeo links with an external player
Another very popular use of Klipper actions is to forward links from video platforms (YouTube, Vimeo, etc.) to a player like smplayer, mpv or similar, so you don't have to open your browser every time you want to watch something.
In this case, the important part is the regular expression that detects the links . A simple version could focus on detecting any URL, but the interesting thing is to refine it to match specific domains. For example, you can use a pattern that accepts both http and https, with or without "www," and that covers domains like YouTube or Vimeo.
One possible expression would be something like https?://[www.yout*|yout*|vimeo*] , where the “?” indicates that the “s” in https is optional (it works for both http and https), and the alternatives in square brackets with vertical bars allow for combining several domain variations. It's not a perfect expression, nor the only possible one, but it illustrates how options and wildcards can be combined to cover different URLs.
Once you've defined the regular expression, in the command area you can add a description like "Play in smplayer" and a command similar to "smplayer "%s"" or "mpv "%s"", always using %s to insert the copied URL . When you copy a YouTube or Vimeo link that matches the rule, Klipper will display a menu where you can directly launch the video in your favorite player.
With this same technique you can set up actions to open file paths with specific applications, launch FTP clients when copying a server URL, or trigger any program that accepts a path or address as an argument on the command line.
Firefox, emojis and images: peculiarities and limitations
In daily use of the clipboard with actions, some different behaviors arise depending on the application. One of the most discussed is that, when copying from Firefox, Klipper actions don't always trigger automatically . For example, if you right-click on a link and choose "Copy link path," the clipboard actions menu might not appear, whereas it does when copying from other browsers like Chromium or Rekonq.
These types of problems are usually due to differences in how each application interacts with the KDE clipboard system . At the time, it was considered more of an integration flaw in Firefox than in Plasma. The usual solution was to go to Klipper and use the "Manually invoke action on current clipboard" option after copying the link, although some later versions and patches have improved the integration.
Another recurring issue is image handling in the history . Some users miss a behavior more akin to Windows or GNOME extensions like Pano, where images are saved prominently in the history and can be pasted almost automatically. In KDE, the behavior depends on the configuration and the application copying the image, and some users find that the history seems to focus more on text than on graphical content.
The same applies to aspects like the emoji selection menu . While in other environments, selecting an emoji pastes it immediately, in KDE the process may require copying it first and then manually pasting it, depending on how the tool is integrated with the clipboard.
If you need a workflow more like GNOME with Pano, you might consider installing alternative tools or combining them with Klipper itself . However, for most users, Plasma's built-in manager is sufficient and very flexible, especially thanks to its actions and ability to store large histories.
History, quick access, and clipboard security
One of Klipper's biggest advantages is that it doesn't lose what you copy when you copy something else . Instead of simply overwriting, it creates a history up to the limit you've configured (for example, 2048 items). This allows you to effortlessly retrieve text or images you used a while ago, something you'll sorely miss in other desktop environments once you get used to it.
If you work with large amounts of data, it's a good idea to combine this history with the search box at the top of the clipboard menu. Simply open it (click the icon or use the keyboard shortcut) and start typing to filter entries based on their content. It's a kind of "snippet search engine" embedded in the desktop environment.
Regarding keyboard shortcuts, in addition to Ctrl+Alt+V to open the menu , you can customize other keys related to the clipboard in the KDE system shortcuts section. It's not possible, at least in many versions, to add entirely new Klipper-specific combinations, but you can adapt existing ones to suit your needs.
In terms of security, there are two ways to view the clipboard history. On the one hand, it's an extremely powerful data recovery tool , to the point that many users find it useful to make occasional backups. The clipboard contents are saved in the "~/.local/share/klipper/" directory, which you can synchronize or back up if you wish (although managing these raw files isn't a very good idea for the average user).
On the other hand, it's important to remember that a long history can store sensitive information for longer than desired: passwords, card numbers, personal data, etc. Each user must decide whether they prefer to sacrifice some convenience and configure a shorter history, with deletion upon exit or periodic cleaning, or prioritize productivity even if it means being more careful about how they handle sensitive information.
By now, it's clear that KDE's clipboard manager, the successor to the old Klipper, is a key component of the Plasma desktop: it combines a configurable history, integrated search, favorites, contextual actions, and some automation capabilities through regular expressions and external commands. By investing a little time in the Actions tab and fine-tuning details like history size, browser integration, and shortcut usage, it's possible to transform it into an incredibly versatile tool that saves clicks, opens applications based on what you copy, and allows you to transform text or links on the fly without always resorting to separate scripts or applications.
Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.

