Automatic rule based time tracker for Linux
Clone or download
flakas Merge pull request #17 from flakas/codeclimate
Fix CodeClimate complaints
Latest commit 938e5ec Jun 24, 2018

Latte - Linux Automatic Time Tracker

A proof of concept automated time tracker, intended for Ubuntu Linux.

Stable: Build Status Development: Build Status

Installing and upgrading

Install (upgrade) from the latest source:

git clone git://
cd Latte
python install


Install via PIP (Python Package Index):

pip install latte

Upgrade via PIP:

pip install latte --upgrade


Configuration files are saved in ~/.config/latte folder.

Statistics files are stored in ~/.config/latte folder (configurable)


Run the binary script either in foreground:


or in the background: latte --silent &

To analyze log data you can use the built in analyzer:

Syntax: lattestats [OPTIONS]

  • lattestats to analyze log data from past 24 hours by window title
  • lattestats -h to print an help message

Time options:

  • --time-all to analyze all known log data
  • --time-seconds S to analyze log data created in last S seconds
  • --time-days D to analyze log data created in last D days
  • --time-weeks W to analyze log data created in last W weeks
  • --time-months M to analyze log data created in last M months

By default lattestats will analyze logs created in past 24 hours.

Grouping options:

  • -g title (default) Groups entries by window name
  • -g instance Groups entries by application name
  • -g class Groups entries by application class


  • -o desc (default) Orders entries by descending duration
  • -o asc Orders entries by ascending duration


  • --display-all Display all found entries from the chosen time interval
  • --display-limit N Display up to N top entries
  • --display-share PERCENTAGE Display entries that have a share of the analyzed logs greater than SHARE, where SHARE is any number between 0 and 100
  • --display-time SECONDS Displays entries that have the accumulated time greater than SECONDS


This application requires:

  • Python 3
  • xprop to detect active window title for log tracking (sudo apt-get install x11-utils)

These dependencies are optional, but without them some functionality will not work:

  • and to detect whether user is inactive (packages libx11-dev and libxss-dev, sudo apt-get install libx11-dev libxss-dev)


To build an Automatic Time Tracker for Linux that:

  • keeps track of windows where the user spends time
  • is aware if the user is active or not
  • collects information for personal analysis and statistics
  • can classify activities based on user defined rules
  • ignores unwanted and sensitive information

All without any human intervention (except for the initial set up).


MIT license, check LICENSE.txt


Special thanks to contributors.