timetracker

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

commit 92698a9c6b98aa04191fe40c27190d961fa9673f
parent b6715dba804f523ea454f87e7f8b84a44b8f7e48
Author: tongong <tongong@gmx.net>
Date:   Sat, 26 Jun 2021 19:55:19 +0200

cleanup and readme update

Diffstat:
MREADME.md | 14++++++++++++++
Mtimetracker | 7+------
2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md @@ -35,11 +35,25 @@ make sudo make install ``` + ## usage ```sh timetracker | timetracker-save ``` +## configuration +There are three things worth changing: + +- the `sleep ...` in `timetracker`: smaller number = higher refresh rate; + higher number = smaller resource consumption + +- the exceptions defined in `timetracker` + +- the `WRITE_INTERVAL` in `timetracker-save.c`: specifies how often data is + written to disk; higher number = higher precision tracking; smaller number = + less storage space used + + ## alternatives see <https://github.com/ActivityWatch/activitywatch#feature-comparison> diff --git a/timetracker b/timetracker @@ -5,17 +5,12 @@ while : do echo - sleep 3 + sleep 1 done & # watch for changes of active window xprop -spy -root _NET_ACTIVE_WINDOW ) | while read -r; do - # program="$(basename "$(readlink -f "/proc/$( - # pstree -lpA "$(xdotool getwindowfocus getwindowpid)" | tail -n 1 | - # awk -F'---' '{print $NF}' | sed -re 's/[^0-9]//g' - # )/exe")")" - # suppress errors when no window is focused / focused window has no pid program="$(pstree -lpA "$(xdotool getwindowfocus getwindowpid 2> \ /dev/null)" 2> /dev/null \