aboutsummaryrefslogtreecommitdiff
path: root/.scripts/whatamidoing
blob: 81612b1751d5fa6ca957001f9db480aef35425f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
# arbtt files have limited read access (good!) ==> write current tag to file using cronjob

if ! [ $(pgrep "arbtt-capture") ]; then
	notify-send "arbtt" "arbtt-capture is not running!"
fi

if [ "$1" = "sync" ]; then
	/home/melvin/.cabal/bin/arbtt-stats --logfile=/home/melvin/.arbtt/capture.log --categorizefile=/home/melvin/.arbtt/categorize.cfg -f '$sampleage < 0:01' --also-inactive | tail -n 1 | awk '{print $1}' >/home/melvin/.arbtt/current.tmp
	mv /home/melvin/.arbtt/current.tmp /home/melvin/.arbtt/current
else
	cat /home/melvin/.arbtt/current
fi