OpenSource programming

April 1, 2009

Klipper updates

Filed under: General — Dmitry @ 3:06 pm


Recently I’ve added a few things to klipper and I thought some of you might be interested to know about them. As for me I’d like you to test this and to report me any bugs you might find 🙂

Basically I’ve added two things. First: now when you copy some file path to Klipper, it can automatically determine a list of apps that can handle this filetype. Here are some examples of action menus it will produce:

klipper menus

Klipper action menus

So, now user has no need to add a lot of custom actions for a basic file types 🙂

Second, i’ve added a dialog which allows you to edit action properties or to add a new action. It looks like this:

"Action Properties" dialog

"Action Properties" dialog

This dialog pops up when you click on “Add Action” or “Edit Action” in the “Actions” config page:

"Actions" configuration page

"Actions" configuration page

That’s all folks! 🙂



  1. This seems to be great work and I am just in a freenzy to see it hit my distribution repos. One question though. When I run powertop I consistently see 1 wakeup/second from klipper. Where could this be coming from? Could there be a polling mechanism similar to the one from powerdevil that would reduce the polling?
    Thanks again for your great work.

    Comment by Luis — April 1, 2009 @ 3:26 pm

  2. Interesting stuff!

    Speaking of Klipper:
    Is there any way we will have a fix for the issue described here:

    any time soon? 🙂 I know, who’s really to blame? But this problem is really annoying…

    Comment by Daniel Andre — April 1, 2009 @ 3:37 pm

  3. Oh, btw, it’s reproted here: 🙂

    Comment by Daniel Andre — April 1, 2009 @ 3:38 pm

  4. @Luis:
    Actually I didn’t dive yet into a clipboard capturing mechanisms of klipper, they were done by other devs long ago. Now I was concentrating on giving some love to the config dialog. At the same time I’m learning a klipper’s source code that’s kinda new for me 🙂
    From what i’ve heard, you’re right and klipper is actually polling a clipboard – that might be the reason of wakeups you see.

    Yep, I know that klipper currently has some copy-related bugs. As I said to Luis above, I’m kinda new to the code and I’ll try to find the reasons and fix copy-related bugs as I go on 🙂

    Comment by Dmitry — April 1, 2009 @ 3:43 pm

  5. @1s wakeup time: The polling of the clipboard should not happen if you have the xfixes extension, which you undoubtedly have… unless I remember wrong. However, klipper has a lot of timers to handle various edge cases, so there are plenty of possibilities left

    @eclipse: A lot of programs have had problems with eclipse, usually because the programs implements the X-standard for clipboard handling wrong. So I would expect this to be a eclipse issue. Then, from my experience, programs refuses to acknowledge this unless you can document it rather thoroughly. This even more so because Eclipse uses a custom windows-based toolkit.

    Comment by Esben Mose Hansen — April 1, 2009 @ 4:09 pm

  6. @Dmitry: Thanks – it’s been around for ages, and noone really took responsibility for fixing it 😦

    @Esben – that’s why I’m not blaming Klipper – I just observe the fact that copying from Eclipse works when disabling the “Prevent empty clipboard” action. I don’t have this problem at all in Gnome, so maybe they are implementing clipboard differently, or maybe they already have a workaround. I just prefer the problem to be fixed one way or another.

    Comment by Daniel — April 1, 2009 @ 4:41 pm

  7. I know that it isn’t very well known, especially for developers who joined after KDE 4.x was started, but KDE3 had a Klipper applet as well, not only the standalone application. Are there any plans to bring it back as a plasmoid?

    Comment by Andras — April 1, 2009 @ 5:39 pm

  8. can you please also make available an option to disable the klipper ‘actions’ ?

    Comment by kris — April 1, 2009 @ 5:43 pm

  9. @kris: That option is already available, just right-click the icon in the systray – there’s an “Enable actions” checkbox.

    Comment by Daniel — April 1, 2009 @ 5:58 pm

    • @Andras:
      Yep, as long as plasma guys improve the systray protocol. I talked to them already.

      to add to what Daniel said I plan to make this action menu unobtrusive – i.e. it won’t popup automatically. Instead when klipper detects that some actions are available for the current clipboard, it will change its icon in systray to indicate that. And when user clicks on this icon, menu will be shown.

      Comment by Dmitry — April 1, 2009 @ 8:20 pm

    • I need an option to disable the automagic built-in actions, not my custom ones. And don’t take the pop-up menu away. Need that to stay. Having to go to the tray will largely defeat the convenience of actions, though I can see how the prevalence of the new automagic actions would encourage such a change.

      Comment by Mark Willson — September 3, 2009 @ 6:23 pm

  10. Dimitry, the idea is exact that the applet variant is not using the systray, so you can put anywhere on the panel or the desktop. 🙂

    Comment by Andras — April 1, 2009 @ 9:28 pm

  11. @Andras:
    I forgot to mention that new systray will allow usual plasmoids to embed in it. That was the main point of our discussion with notmart: the space on a panel is always needed, so one more applet there would waste it even more. It’s good to have all applets such as this grouped in one place – systray. But now it doesn’t support it. Therefore I’ll wait 🙂

    Comment by dimsuz — April 3, 2009 @ 1:06 pm

  12. […] Тем не менее, на днях Дмитрий Суздалев решил внести ещё пару улучшений в программу. Во-первых при копировании пути к файлу к списку […]

    Pingback by Улучшения Klipper « — April 14, 2009 @ 12:44 pm

  13. Hi, there seems to be a bug, but now clear if it distrorelated. After upgrading from KDE4.2.3 to 4.3. Beta 1 I did not have any clipper actions triggered, also the clipper actions in configuration where gone. So I asked others for their config-file which they had from trunk and it had more in it, but it also did not work. I had to work manually on the config file to get it working.
    Here the thread

    Comment by Mark — May 29, 2009 @ 2:07 pm

  14. @Mark:
    Thanks for info, I left a comment in that forum thread, check it out 🙂

    Comment by Dmitry — May 29, 2009 @ 2:45 pm

  15. Fuck ! , where is the configurations which do the same as previous version ?

    Are you kinding with me I upgrade kde , and lost my useful functions ? because someone made a change , you should at least made an comprehensibly example.

    Comment by Sérgio — August 28, 2009 @ 12:22 am

  16. [Action_0]
    Number of commands=1

    Commandline[$e]=new command
    Description=Command Description

    Commandline[$e]=kfmclient exec %s
    Like [Action_0], I need fill [Action_1] with Description, Number of commands, and Regexp.

    Description and number of commands I can guess , but regexp what should be for action #1 ?

    Comment by Sérgio — August 28, 2009 @ 4:21 am

    • oops,
      I ‘ ll try explain my self, on thread Klipper actions missing

      After kill klipper and copy an old kde/share/config/klipperrc
      to /home/sergio/.kde/share/config/klipperrc and
      start klipper again, actions back to normal !.
      I just don’t understand why klipperrc , was missing first part of definition of commands, and in “actions config” of configuration of klipper, actions was missing.

      Sorry .

      klipperrc some how must to be like this:

      Number of commands=6

      Commandline[$e]=kfmclient exec %s
      Description=Open with &default Browser


      Comment by Sérgio — August 28, 2009 @ 4:35 am

      • well I found the bug , and hope that can help
        when on ~/.kde/share/config/klipperrc

        Number of Actions=0

        all actions stops ,

        Number of Actions=1 (or more )

        yours pretty menus appears in all cases …


        Comment by Sérgio — August 28, 2009 @ 5:12 am

  17. Klipper has great promise, but obviously different requirements for different people.

    Personally I’d like to turn off all the built in actions, but keep my own actions for my own regexes.
    My regular expressions are quite specific, and I do *expect* the klipper menu to pop up at mouse cursor when I select something matching my own regexeps. All the built in actions are just a distraction to me.

    Would it be an easy thing to turn off the built in actions?

    Comment by Harri — September 10, 2009 @ 12:20 pm

  18. H355KO

    Comment by jenifer — October 17, 2009 @ 10:46 am

  19. Hi, I’m new I would like to welcome all… 🙂

    Comment by PXStevey — January 25, 2011 @ 4:38 am

  20. our brains are sore. Instead of always taking this approach, what if we engaged a new part of ourselves
    Oakley Dispatch II Sunglasses

    Comment by Oakley Dispatch II Sunglasses — September 10, 2014 @ 4:34 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: