I am looking for a service that will let me create messages that interrupt me at randomized intervals while I'm using my laptop.
June 3, 2011 10:49 AM   Subscribe

Please help me find a service or tool that will let me create messages that interrupt me at randomized intervals while I'm using my laptop. Probably this would be classed as a productivity or self-help app, but I can't find anything relevant via Google or poking around sites like Lifehacker.

I've found several "quantified-self" type survey tools that will randomly interrupt me with questions --e.g., trackyourhappiness.org-- but I can't control the content of the messages. And there are lots of tools for scheduling messages to myself --e.g., Remember The Milk-- but their timing doesn't randomize, and I am really looking for something more invasive/intrusive than e-mail. I am not looking for a RescueTime internet usage analyzer type application: the purpose here isn't to stop me wasting time on non-work stuff.

Basically -- I want a service that allows me to set up custom full-screen pop-up-type text messages that will randomly interrupt me regardless of what I'm doing. It doesn't literally need to pop up or be full-screen, but that's the kind of effect I'm looking for -- blinking is fine, bright colours are good, big font is great. I want it to get my attention :-)

FWIW you can assume I'm always connected to the internet, and I am using Ubuntu and Chrome.

Please help me!
posted by Susan PG to Computers & Internet (5 answers total) 2 users marked this as a favorite
A bit of work, but with Ubuntu you could write a small script using sleep and notify-send.
posted by Triton at 11:12 AM on June 3, 2011

Since you're on Ubuntu you could use a tiny shell script like this:
while true
   perl -e 'sleep(rand(600));'
   xmessage -nearmouse 'hello, I am a reminder'
(there might be a more elegant way to sleep for a random number of seconds than that perl oneliner, and you can substitute xmessage with some other thing that pops up a window, but you get the idea)
posted by hattifattener at 11:13 AM on June 3, 2011

workrave is so close to what you're looking for, but it has consistent, regular pause reminders... so close! maybe it will put you on a better search path...
posted by raihan_ at 12:14 PM on June 3, 2011

You can very easily make a script that runs in a terminal and 1. blinks 2. prints custom messages 3. does that at random times. I can help you if you run into problems. I've written various scripts in python that do all of the above, although not in a single script. You will need to write maybe about 20 lines of code or so.

Memail if you need help, but here's a few tips on how to get started:

You can have it blink by printing a screenfull of '#' chars and sleeping half a sec then printing blank screen and sleeping half a sec.

Custom messages go in a list at the top of program and then use random.choice() function.

Then sleep for a random time using time.sleep() and random.randint() functions.

This should be a good starting point (except that Mefi eats the indentation):

#!/usr/bin/env python
from time import sleep
from random import choice, randint

msgs = ['msg 1', 'msg2']
hashes, blank = '#'*79, ' '*79

def blink():
for x in range(5):
for line in (hashes, blank):
for y in range(24):
print line

def main():
while 1:
print choice(msgs)
sleep(randint(300, 600))

posted by rainy at 2:31 PM on June 3, 2011

err - in the main loop the 'print message' should be at the end, not beginning.
posted by rainy at 2:33 PM on June 3, 2011

« Older Where to watch live free streaming tennis - Roland...   |   How can I download a large batch of videos from a... Newer »
This thread is closed to new comments.