timetracker

suckless timetracking
git clone https://tongong.net/git/timetracker.git
Log | Files | Refs | README

README.md (1698B)


      1 # timetracker
      2 
      3 This project aims to be a suckless approach to timetracking.
      4 `timetracker` only tracks one thing: the currently used program (focused
      5 graphical window or active process in terminal window).
      6 
      7 The data collection and visualization are strictly separated. That way you do
      8 not need to start a webserver or some other bloated program to run the tracker.
      9 You are also not bound to one specific front-end (it is actually pretty easy to
     10 write one yourself).
     11 
     12 This repository provides three programs:
     13 
     14 - `timetracker` prints the name of the currently used program to `stdout`
     15   whenever it changes.
     16 
     17 - `timetracker-save` reads program names from `stdin` and saves time statistics
     18   periodically to `~/.local/share/timetracker/data`
     19   (or `$XDG_DATA_HOME/timetracker/data`). Every line in this file contains a
     20   timestamp and a list of programs with their usage time (in seconds), for
     21   example:
     22   ```
     23   1623598421,bash:4,nvim:364,firefox:235
     24   ```
     25 
     26 - `timetracker-report` is a python script which shows graphs of your usage
     27   time.
     28 
     29 
     30 ## installation
     31 ```
     32 git clone https://github.com/tongong/timetracker
     33 cd timetracker
     34 make
     35 sudo make install
     36 ```
     37 
     38 
     39 ## usage
     40 ```sh
     41 timetracker | timetracker-save
     42 ```
     43 
     44 
     45 ## configuration
     46 There are three things worth changing:
     47 
     48 - the `sleep ...` in `timetracker`: smaller number = higher refresh rate;
     49   higher number = smaller resource consumption
     50 
     51 - the exceptions defined in `timetracker`
     52 
     53 - the `WRITE_INTERVAL` in `timetracker-save.c`: specifies how often data is
     54   written to disk; higher number = higher precision tracking; smaller number =
     55   less storage space used
     56 
     57 
     58 ## alternatives
     59 see <https://github.com/ActivityWatch/activitywatch#feature-comparison>