you are viewing a single comment's thread
view the rest of the comments
[–] 7 points 6 months ago*

crontab, it's enough to :

  • kill any add during specific period
  • accumulate usage per app
  • check if tabs are opened

and it's pretty straighforward to configure, e.g.

* 8-17 * * 1-5 killall SlayTheSpire && date >> ~/shame
# prevents from playing during weekday working hours

or for accumulation (which can be reset daily, weekly, etc by simply deleting the minutes file)

pgrep mpv && >> mpv_minutes; if [ $(wc -l mpv_minutes) -gt 1000 ]; then echo beyond threshold; fi

That works also for turning up/down network interfaces.

PS: I use this on myself. I'm not a child but I don't have perfect self control. It works.

  • source