I started doing something similar to help me with my work as a freelancer.
My approach involves scheduled popups with questions that are really quick to answer. Right now I'm only asking myself "are you being productive?".
I just put it on github an hour ago: https://github.com/bbonf/productive It's probably too raw to be helpful to others, but I plan to improve it soon.