QtMess

Contents:

Links:

Current Version: qt4mess-0.5alpha

Introduction

qtmess is a program that has only one job: It pops up a message on the screen and has an OK button to make it go away forever, and a Snooze button to make it go away, but come back later. Getting the popup to appear in the first place is a job for some other tool, qtmess has nothing to do with that part of the equation.

What makes qtmess unique (or annoying, depending on your point of view) is the ability to use different themes to popup hard to ignore messages.

qtmess is written in the Qt toolkit (recently converted to version 4 from version 3), but despite using a multi platform toolkit, has only been ported to linux at the moment.


Running qtmess

qtmess has three optional arguments and also accepts the normal X11 arguments (such as -geometry).

  • -theme theme-name

    This names the theme qtmess will use to display the message. The default theme (if no -theme option is given) is named boring.

  • -snooze time

    This specifies the amount of time the Snooze button will wait before popping up the message again. The time can be given in several units. The default is milliseconds, but you can use the suffix sec for seconds, min for minutes, or hr for hours. The default is 5min (5 minutes).

  • -stamp file

    This option writes a timestamp to the specified file. (If you use qtmess with remind, you can use the timestamp file to determine which appointments you missed when remind wasn't running.)

The remaining arguments are displayed one argument per line in the message area of the popup.

Examples:

qtmess Your Message Here

qtmess -theme kilroy -snooze 30sec 'Your Message' Here


Themes

A qtmess theme is simply a directory (the name of the directory is the name of the theme). Inside the directory is a file named qtmess.xml which is a very basic format xml file defining how the popup window is drawn. The main parameters defined in the file are the image to use for the popup background and where to draw the text and the buttons inside that image. The image files are typically other files in the same directory with the xml file.

By default, qtmess will search for theme directories in the path:

  • ./
  • ~/.qtmess/themes/
  • /usr/local/share/qtmess/themes/
  • /usr/share/qtmess/themes/

You can define the environment variable QTMESSPATH with a : separated list of directories to override the default.

The current themes provided are:

  • boring A plain old boring message box as shown in the first example above.
  • frog A frog-like alarm clock I found on the web.
  • kilroy The classic Kilroy Was Here graffiti. (Second example above.)
  • owl An Owl Mail theme based on an obscure little book and movie series I'd best not mention if I don't want Warner lawyers breathing down my neck :-).
  • late A white rabbit who is late which I use for missed reminders.

qtmess.xml

PUT TEXT HERE - explain how to write a qtmess.xml file (after re-writing the parsing code and converting all the theme files to new and improved format).


Other Programs

splitmess.c is shipped along with the qtmess source code and is convenient to use along with remind for popping up messages. The splitmess program accepts a single argument and (without triggering any unsafe shell processing) splits it into multiple arguments, recognizing spaces and quotes, then execs qtmess with those multiple arguments.

To simplify the remess script (below) splitmess also takes the -b option to background the qtmess program it execs.

catchup and remess are two perl scripts I use to detect missed reminders that would have triggered when I wasn't logged in an running remind in demon mode. The catchup script is fairly general purpose. It prints the lines generated by running remind -n -b1 which fall between the modification date of the timestamp file and right now. The remess script is more of an example of what kinds of things you can do with the output from catchup. In my case, I modify the theme and geometry and popup the missed reminders again.

In my X session startup code, I run:

catchup ~/.rs ~/.reminders | remess

remind -a -z -k'splitmess %s &' .reminders

Then, in my reminders file I can put stuff like this:

REM Fri AT 20:30 \
MSG -geometry +0+785 -theme kilroy -snooze 30sec \
'Take Out' Trash


Build and Install

There is no fancy installer or anything, but there is a top level Makefile with some targets that work for me on Fedora Core 6. You can edit the PREFIX macro in there to choose to install some place other than /usr/local.

Unpack the tarball somewhere, cd into that directory and type:

make

and that should build qtmess down in the qtmess directory and splitmess down in the splitmess directory. You can test by cding to the qtmess directory and running:

./qtmess -theme owl Hello World

To install everything in /usr/local, you could become root and do this (back in the top level directory, not in the qtmess subdirectory):

sudo make install


Download

My (Tom Horsley's) home page is: http://home.comcast.net/~tomhorsley/. There you will find links to software, hardware, and the political ideas which will someday save the world. (That's the real point of the free software - to lure you to my home page and infect you with my politics. :-)

The QtMess home page is: http://home.comcast.net/~tomhorsley/software/qtmess/qtmess.html

Download latest source from: qt4mess-0.5alpha.tar.bz2

This is a work in progress, and I'm planning a complete rewrite of the way the .xml theme definitions work, so I wouldn't get too carried away with writing themes just yet...

Page last modified Tue Jul 15 19:44:05 2014