location: arbtt_time_tracking

Institute of Mathematics - PublicMathWiki:


The Automatic Rule-Based Time Tracker Arbtt is a desktop daemon that runs in the background and, every minute, records what windows are open on your desktop, what their titles are, which one is active and on which workspace you are.

Note: Please be aware that Arbtt may track sensitive data. It is not possible to specify which data Arbtt should track, you can only filter it after everything has been recorded.

Start daemon manually

In Terminal type :

(arbtt-capture &)

Start automatically after login

(Session restart required)

In Terminal type :

cp /usr/share/doc/arbtt/examples/arbtt-capture.desktop ~/.config/autostart/

read statistics

After starting Arbtt the first time you can create a minimal configuration file with the following command:

printf "{\n\$idle > 300 ==> tag inactive,\n tag Desktop:\$desktop,\n tag Program:\$current.program\n}" > ~/.arbtt/categorize.cfg

Note: This configuration file does not specify what actions are recorded. Instead it configures how the recorded data ist tagged and displayed using the program arbtt-stats.

Then you may use arbtt-stats to see your statistics:

> arbtt-stats
Total time per tag
         Desktop:TEMP | 33m00s |      60.00
Program:google-chrome | 28m00s |      50.91
          Desktop:GRC | 21m00s |      38.18
Program:mate-terminal | 12m00s |      21.82
 Program:sublime_text | 11m00s |      20.00
        Program:gedit |  2m00s |       3.64
         Program:caja |  1m00s |       1.82
       Program:Tomboy |  1m00s |       1.82
          Desktop:WS1 |  1m00s |       1.82

filter statistics by month

arbtt-stats --for-each month

From the manual:

--for-each PERIOD
This is not a report of its own, but causes the selected report to be executed for each of the given PERIOD (which can be minute, hour,day, month or year) where there exist selected samples. All the reports will then be printed one after another or, in the case of CSV output, with an additional column.

configuration file

Before we read the statistics above, we have created the configuration file ~/.arbtt/categorize.cfg

$idle > 300 ==> tag inactive,
tag Desktop:$desktop,
tag Program:$current.program
  • The first line indicates that the data is not counted if the user was idle for more than 60 seconds. (idle = no mouse / keyboard action)
  • The second line creates a tag for the workspaces. It created lines such as Desktop:WS1 |  1m00s |  1.82 in the above statistical output

  • The third line creates a tag for the programs. It created lines such as Program:gedit |  2m00s |   3.64 in the above statistical output

The syntax of the configuration file is very powerful. You may find a complete manual at Abtt Config Manual

statistics export

Output Arbtt statistics in a CSV format with arbtt-stats --output-format=csv:

> arbtt-stats --output-format=csv

PublicMathWiki: arbtt_time_tracking (last edited 2021-02-01 10:50:22 by eseide)