Change the Week Start Day in Hamster Applet

November 24, 2008 by
Filed under: gnome, HowTo, linux, Ubuntu 

I've been using the Hamster Applet time tracker for a few weeks now. See the initial post about Hamster here. One thing that was bugging me was that the weekly reports start on Sunday. The work I am tracking uses weeks of Monday through Sunday, so I wanted to change the week start to Monday. I couldn't find a way to change this in the preferences, so I started digging through the code. It turns out there is an easy way to do this by editing one of the program's Python files.

Here's what an empty weekly overview looks like before the change.

Hamster Applet Week Starting Sunday

Hamster Applet Week Starting Sunday

You need to edit the file as root. Use the following command.

Affiliate Link
sudo gedit /usr/lib/python2.5/site-packages/hamster/

Find the line that looks like

self.week_start_sunday = self.locale_first_weekday() == 1

and change it to

self.week_start_sunday = self.locale_first_weekday() == 0

That's it. Restart the Time Tracker by removing it from the Gnome panel and adding it back. As you can see, the weekly overview now starts on Monday.

Hamster with Week Starting Monday

Hamster with Week Starting Monday


Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>