0

As per Nick Winter's The Motivation Hacker, I want to measure my happiness. I know that I'm bad at remembering things or responding to reminders, so I'd like to set up a daemon that, at random intervals would:

  • Check if I'm in a tty and if I am, output a message to that tty/pts, then capture input until newline

  • Check if I'm in (currently using) the graphical interface, and if I am, launch a dialog to capture input.

How can I do this?

0

You can use a cron deamon and expect expect.sourceforge.net the deamon would check the time and expect. From the website

xpect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial. Expect is also useful for testing these same applications. And by adding Tk, you can also wrap interactive applications in X11 GUIs.

This means you can ask for input like a click or an oki.

  • How does this interrupt what I'm doing? – Glycan Aug 5 '14 at 20:42
  • Wouldn't that happen in a separate, normally unseen process? – Glycan Aug 5 '14 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.