Jan Grulich

Introducing plasma timekeeper – an applet measuring your activity

Have you ever wondered how much time do you spend reading emails, browsing on internet or hacking? I have! I started thinking about monitoring my activity. Reason for this was that I work from home, where I’m alone and nobody is behind my back watching what I’m actually doing. So I came with an idea to write a simple applet which tracks the time you spent in a certain application by just checking your currently active window (application). The functionality is pretty simple, you switch focus to a window where you do something, the applet starts measuring the time and update it in some interval until you switch to another window and so on. It may not be accurate in case you will be cheating, e.g. you open a video player and start watching a movie while you switch focus to another app to avoid monitoring time spent in the video player. Given this, the purpose of the applet is pretty obvious, it should be just for you, for your personal usage when you have no reason for cheating, because you are interested in these statistics.

Here are screenshots of the current version:

Compact versionPopup window

The applet has a compact version which you can put into your panel, it shows the current active window and the time you spent in there. Once you click on it, it will popup a window showing a list of all applications you used ordered by usage. To extend the basic functionality I added buttons to start/stop monitoring, a button to reset the current statistics (there are even options to reset the statistics on suspend/reset/shutdown in applet configuration) or buttons to blacklist applications you don’t care about.

For those who are interested in trying this little project of mine or they want to contribute and extend it, fix something or report an issue, here’s the link.

20 thoughts on “Introducing plasma timekeeper – an applet measuring your activity

  1. Would it be possible to add a feature that tracks the tab name, potentially with some wildcard filters for summarizing time? The reason for asking is that I both work and procrastinate in the webbrowser 🙂

  2. I’d love to give this a try, even if I’m not sure that I’m not sure about compiling this myself.

    I use NetBeans and I can configure it to show the opened project name in the titlebar (actually it only shows the project name, I can’t display “Netbeans” before the project name with this setting).
    It could be great if I could do some stats per project in Netbeans ! Any chance that your applet can manage this usecase in the future ?

    1. That’s kinda similar request to the one above. I would like to add an option for each application to filter activity based on window title separately. Example: in chrome/firefox/whatever you configure that “bugs.kde.org/*” will be measured separately, so once you switch to bugs.kde.org in your browser and with assumption the browser shows the web page name in the window title I can track it separately. I guess this can work pretty well with netbeans as you said you can display the project name in the window title.

      1. Thank you for your reply. Actually I mentioned the fact that once netbeans is configured to display the project name in the titlebar, it don’t display the application name (“Netbeans”) anymore (but maybe I’m missing something)… so I was wondering if you have access to some internal properties of the window (and not only the titlebar text) to extract the needed informations.
        Cheers

  3. Hi,

    I wanted to give it a try and I built it with no errors but the applet complains:

    Error loading QML file: file:///usr/share/plasma/plasmoids/org.kde.plasma.timekeeper/contents/ui/main.qml:24:1 module “org.kde.plasma.timekeeper” is not installed

    I tried to make the version match to 0.2 in metadesktop files, but it didn’t work either.

    Any hint?

    Thanks

  4. Thanks!

    (Btw, I left the message first here, and then realized that it’s better to report the issue in Github, sorry about that)

  5. Hi,
    Nice applet idea 🙂
    Looking at the second screenshot, is there is possibility to add a percentage on each application in addition to the time monitored ?

  6. Oh my. What a great idea !
    Any plans to allow this to interact with KDE’s activities ? Some applications can be open in several activities, but I won’t be doing the same thing with them depending on which activity I’m currently using. It could be useful to group these stats by activity.

  7. Awesome!
    I’m looking for a time tracking tool for some time now and did not find one that fits all my needs. Would it be possible to add virtual-workspace related time tracking. I usually use different workspaces for different jobs and I like to track how much time I spend on them.
    Ktimetracker was good for this but sadly is not ported to qt5. Timeit (https://github.com/Hoglet/TimeIT) is nice because it can sync its tracked time to a server but isn’t really integrated.
    Also an export of the tracked time would be nice (or even an integration for example to redmine)

    1. I can imagine adding support in future for tracking virtual desktops or as mentioned above some integration with KActivities, but right now it’s just a small project I started to cover all my needs and I didn’t add anything related to KActivities or virtual desktops, because I don’t use them at all. I wish I could add all functionality you all mentioned, but I don’t have enough time for that, so patches are welcomed :).

      1. > I can imagine adding support in future for tracking virtual desktops

        The source code of KTimeTracker can be helpful? 🙂

        1. One good idea is having e.g.:
          – One virtual desktop for working.
          – One virtual desktop for reading the news.
          – One virtual desktop for leisure time.

          So you have e.g. a web browser in all those desktops, a file manager, too, and you can keep the time you spend working, or reading the news, etc. easily, (without having to configure and detect if your web browser is opening one page or another).

  8. I see you don’t monetize your blog, don’t waste
    your traffic, you can earn extra bucks every month because
    you’ve got high quality content. If you want to know how to make extra $$$,
    search for: best adsense alternative Dracko’s tricks

Leave a Reply to jgrulich Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll To Top