I've a similar hack with an ultrasonic distance sensor sitting on top of my monitor that I use as a presence sensor to tell the computer when I’m in front of it or not. [1]
Apart from pausing and resuming my music player, a shell script displays the number of minutes I've been in front of the computer in calm green text in the corner of the screen. After 45 minutes this turns to large red text and a sound-clip telling me to "move it, move it"[2] plays every five minutes.
It's worked well for me. I'll step away and do a couple of stretches and step back. Timer resets automatically with no other intervention.
I suppose I could augment this with a remote alarm+button similar to Jacob's to force the issue.