Today I'd like to introduce Klipper, easy, small and very useful tool included in KDE Workspace since...well, always. That's the scissors icon sitting in the systray area. Basically it is a history of your clipboard but it can do much more. Very important thing is that the contents persist between sessions, so if you have something in your clipboard, you log off/reboot/shutdown and then you log back in, you still have your whole clipboard history ready and the most recent entry already in clipboard, so you can paste it immediately.
Clicking the scissors icon will show you your history. Clicking on any item in the history will make it the current clipboard content that you'll paste when you press Ctrl+V or if you use the Linux paste way - paste by pressing the middle mouse button. You can have the clipboards separated for text selection with mouse and for whatever you copy using Ctrl+C, so what you'll copy with Ctrl+C will be pasted only with Ctrl+V and what you select by mouse will be pasted only by the middle mouse button. But you can set Klipper to keep those two synchronised, so when you'll copy a file for example, you can then paste it with your middle mouse button.Klipper allows one to enter custom content into clipboard. Say that you want to paste the same thing to 10 different places. First you'd need to write it down somewhere and copy from there. But Klipper is way smarter - just click the scissors and select "Edit Contents..." and small window for text input will popup. Enter your text and you can start pasting around. Cool thing is that you can set your own key combo for this, so you don't have to click the systray icon everytime.
Another great feature is generating a QR code of your clipboard content. Let's say you need to call a number which is listed on a website or that you need to send a picture from your phone to some long email address you have in your inbox for example. So what to do? Just select that text with your mouse, Klipper automatically catches it and then simply click "Show Barcode..." from Klipper's menu (or, again, set a key combo for quicker access). Fire up a QR reader on your phone (who doesn't have it these days?), scan the QR from the screen and you're done.
With that are related Klipper actions. Depending on the clipboard content, Klipper can automatically run a particular action. For example if you copy a website address, you can have a browser opening that address without you taking any action. You can set your own commands based on regular expressions, but this requires some higher knowledge (ie. it's not a click-through setting). Since automatic actions triggering can sometimes be very annoying or unwanted, Klipper lets you set this to manual trigger only. Simply copy something, from Klipper's menu select "Manually Invoke Action on Current Clipboard" (yep, shortcuts...) and there you go.
Userbase (userbase.kde.org) has a nice example of using Klipper's actions - automatic searching for phone numbers online. Read more at http://userbase.kde.org/Klipper/How_to_search_in_phone_books_using_Klipper
Great use is in repetitive pasting. Be it some texts (like "canned email responses"), some pieces of code etc. You don't have to go back to the original source everytime after you put something else in your clipboard, it's simply still there.
You can also set how big the history should be. By default it's 10, but if you need more or don't need that much, there's nothing easier than firing up the config and setting your own number.
I got used to Klipper so much that I consider it more a part of the Workspace rather than an (standalone) application. Simple, easy to use and so powerful. That's what KDE software is all about.
Oh and by the way - if you like KDE software and if you would like to support our goals and mission, joining us was never easier! You can support our efforts with your own skills (be it programming, app design/UX (highly wanted!), writing documentation etc), or by donating little money to support the development by "joining the game". Feel free to contact me for any details :)
Another great blog! Never new klipper was this power full. Keep up the good work. Looking forward to your next installment.
Posted by: George Labuschagne | Sunday, 20 November 2011 at 16:51
For me, the most useful tip for klipper is how to enable its old functionality (pre KDE 4.5):
Go to "System Tray Settings -> Entries" and there assign the control+alt+v shortcut to klipper.
Now wherever you are, by pressing control+alt+v klipper's popup opens and you can start typing to search your clipboard's history! No mouse needed. :)
Posted by: AndMarios | Sunday, 20 November 2011 at 17:46
May I ask for the font that you're using in the menu's? Looks nice.
--
Richard
Posted by: Openid | Sunday, 20 November 2011 at 20:42
@Openid - That's Ubuntu's font called...wait for it....Ubuntu :) It's free for download, so you can install it as well.
@AndMarios - Nice! Thanks for sharing :)
@George L - Thanks :)
Posted by: Marty | Sunday, 20 November 2011 at 22:14
While I'm a big fan of KDE 4 in general, I have to say that I don't share your enthusiasm about the KDE 4 version of klipper. It might have some really fancy features, but the core functionality is severely broken.
In KDE 3 you could configure klipper to show it's pop-up menu at the current mouse location, so you could just press Ctrl-Alt-V, switch to the entry you wanted to select, press return, everything done without having to look away from the text you were writing.
In KDE 4 you have to use the general keyboard shortcut functionality of the system tray to activate klipper (that what the tip from AndMarios is about). This has several drawbacks:
- The pop-up menu does open at the location of the sys-tray, not the mouse location.
- The preselected menu entry is "configure klipper", which is close to the bottom of the list, while most of the time you need to switch between the first entries of the actual history.
- When you have finally reached the top of the history (after pressing cursor up about 10 times) and you press return nothing happens! Not even the tick mark changes its location. You have to press ESC to make the pop-up go away.
I have to say that I have difficulties imagining a way to break the old behavior even more than they have done. This is even more embarrassing as the usual complaint about KDE/Gnome UI design is that it's done by programmers who have no clue about actual users, but in this case the most frequent users of this feature _are_ programmers! So how can the KDE developers live with this broken behavior.
And no, the new Ctrl-Alt-Up/Down is not a substitute for the old behavior! Even more embarrassing is that this short-cut conflicts with copy line up/down in _every_ IDE I know of (KDevelop/QtCreator/Eclipse).
Usually I don't rant about stuff so strongly, but this is really frustrating. Many years ago I made jokes about people that praised VisualStudio because it didn't even have a copy&paste history. It has this feature now since several years, and now the joke is on us.
Posted by: Christoph Karle | Monday, 21 November 2011 at 12:54
@Christoph Karle - Thanks for the input. It's a perfectly valid rant ;) I never knew you could use Klipper like this before, that's why I didn't even mention it. Anyway, quickly looking through bugzilla, I found only 1 (one) bug report on this with 3 people in CC and 210 votes (doesn't mean 210 people voted, you can give for example 10 votes to a bug).
Nevertheless I think I know what the problem is (ie. why it has not been implemented yet). The problem is technical and can't be easily solved. I'll try doing some digging, watch for https://bugs.kde.org/show_bug.cgi?id=254994 ;)
Posted by: Marty | Monday, 21 November 2011 at 13:05
What icon theme are you using Marty? Systray icons look so much better in it!
Thanks for the post.
Posted by: Carlos Cordoba | Monday, 21 November 2011 at 18:10
Do you know if there's possible to tell Klipper not to copy "air"? I am up to my b***s of trying to paste what I have just selected with my mouse and when middle click it pastes nothing because in Klipper's list, in the first place is nothing, nada, an empty entry without even a tick mark.
Thanks and regards.
Posted by: Carlos Alvarez | Monday, 21 November 2011 at 18:17
@Carlos Cordoba - that's Helium plasma theme, the icons comes with it :)
@Carlos Alvarez - no, I don't think you can set this anyhow, but would be indeed nice if Klipper wouldn't do that.
@Christoph Karle & AndMarios - I fixed the "open on mouse position" bug \o/ But I'm not sure when this will land in stable release, probably 4.8.1.
Posted by: Marty | Monday, 21 November 2011 at 18:23
@Marty: Yes, seems the changes in the shortcut handling they did around 4.3 make it difficult to implement the old behavior. But strangely it _can_ be implemented in principle, maybe without using the KDE specific sys-tray API. In the bug tracker thread you linked is a reference to parcellite, which I promptly installed and which does just what the old klipper could do. And it's running perfectly fine inside the KDE sys-tray! In some other ways it's not as nice as klipper, but it's a good stop gap solution.
It's always a bit unfair to criticize the work of people that spend lots of their spare time to build something useful and freely available. But on the other hand some stuff just really annoyed people during the first 4.X releases and it's hard to get users back that left because they have gotten annoyed. And some open points still remain, like klipper. So from the viewpoint of KDE world domination (which I'm all for) it would sometimes be better if some long standing issues would finally just be fixed. If I would understand the cause for the klipper problem better, I might even do it myself ...
Posted by: Christoph Karle | Monday, 21 November 2011 at 18:32
@Christoph Karle - 100% agree. Once users get disappointed, it's very hard to get them back. Maybe with KDE SC 5 it will get much better, because that's going to be the legendary KDE4.
Nevertheless, the cause for that menu was a port to KStatusNotifierItem and it just regressed after it was done. I brought that feature back, the code is in review process and should hopefully be available in KDE 4.8.1, maybe even 4.8 ;)
Posted by: Marty | Monday, 21 November 2011 at 18:35
Hi,
I also posted some klipper stuff on planet kde:
klipper -> online paste service:
http://salout.github.com/blog/2010/03/03/awesome_klipper_workflow.html
klipper -> url shortener:
http://salout.github.com/blog/2010/03/03/klipper_compatible_url_shortener.html
So easy to extend klipper with scripts!
Nice idea to write posts like this. Would be even better to also make these pictures available at your rss feed!
Best,
Robert
Posted by: Robert Riemann | Monday, 21 November 2011 at 23:31
@Marty: Way cool! Looking forward to 4.8.
Posted by: Christoph Karle | Tuesday, 22 November 2011 at 10:39
Marty, thanks for letting me know the font. Just installed it :)
--
Richard
Posted by: Openid | Tuesday, 22 November 2011 at 22:31
@Robert Riemann - thanks for the links! As for the pictures - unfortunately I have no control over the rss, sorry :/
Posted by: Marty | Wednesday, 23 November 2011 at 17:13