I use Hamster for time tracking at work and the lack of an applet which works with Unity’s panel is my main obstacle to the adoption of Unity (which I love BTW). For this reason I hacked on the applet’s code in my (very limited) spare time at weekends and I managed to get what I needed i.e. a functioning appindicator for Hamster. I wasn’t aiming for the perfect example of usability but simply an indicator which could reproduce the functionality of the old applet, therefore feedback is more than welcome from the design team, design enthusiasts, etc.
Note: I know that there was a discussion about integrating Hamster in the Clock indicator but, as I said, this wasn’t my objective, even though I do not exclude future evolutions of the indicator in this direction. I should talk to upstream too.
I adopted a rather opportunistic (call it hackish) approach to the problem. Rather than duplicating code or patching the original code, I chose to create a subclass of the HamsterApplet class (from Hamster’s applet.py) and to override the parts that I didn’t deem suitable for the indicator (such as the panel button and the sticky activity window). Long story short, the code in Hamster does all the heavy lifting while my code deals mainly with keeping the indicator updated. A proper solution would probably involve creating a more generic class which both the HamsterApplet class and my new class can inherit, assuming that this is the path that upstream want to follow (as they might have different plans in mind, especially on the user interaction side).
As you can see, the indicator is very simple. I just re-used the icon from Hamster but I’d love to see a monochromatic one instead.
Click on the “New activity” menu item and you’ll get the old activity dialog near the indicator. I had to make the dialog a decorated window as, otherwise, you wouldn’t have a way to hide the dialog without a panel button, if, for example, you clicked on that menu item by mistake. Clicking “Start Tracking” still hides the dialog.
Personally, I’d like to see something smaller than the following dialog, for example without all that’s below the “Today” expander (included) and with the remaining elements arranged in a more space efficient way. Or maybe we could have something other than a dialog to do this (e.g. integration with the Unity dash?). I’m digressing now…
This is the indicator in action. You can click on the activity name so as to get a dialog to edit the current activity or you can also decide to stop the task from the indicator. Of course the old “Add earlier activity” and “Show Overview” dialogs are still there.
Note: the screenshots in this blog post were taken in Maverick 10.10.
How to try it
I haven’t had the time to package it yet but you can simply download the “hamster-indicator” file from the git repository below, make it executable, double click on it and select “run” (at least in Gnome). You also need to have the “hamster-applet” package installed.
The code is hosted here.
I’ll package it and put it in a PPA soon.