= Arbtt = 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 ================== __________________Tag_|___Time_|_Percentage_ 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 [[http://arbtt.nomeata.de/doc/users_guide/configuration.html|Abtt Config Manual]] == statistics export == Output Arbtt statistics in a CSV format with `arbtt-stats --output-format=csv`: {{{ > arbtt-stats --output-format=csv Tag,Time,Percentage Desktop:TEMP,0:45:00,67.16 Program:google-chrome,0:39:00,58.21 Desktop:WS2,0:21:00,31.34 Program:mate-terminal,0:13:00,19.40 Program:sublime_text,0:11:00,16.42 Program:gedit,0:02:00,2.99 Program:caja,0:01:00,1.49 Program:Tomboy,0:01:00,1.49 Desktop:WS1,0:01:00,1.49 }}}