
wminfo README.alarm.wmi


The alarm.wmi plugin alerts when the given time and date comes.  It uses the
alarm.cfg database to establish the dates and the times of the alarms.  The
format of that text database is:

    MM             - ...
    HH:MM          - ...
    WD HH:MM       - ...
    DD HH:MM       - ...
    MM-DD HH:MM    - ...
    YY-MM-DD HH:MM - ...

where WD is a weekday name abbreviation -- for example:

    01             - once an hour
    08:02          - once a day
    Sat 08:03      - once a week
    24 08:04       - once a month
    11-24 08:05    - once a year
    12-11-24 08:06 - once

The time or the date and the time of the alarm have to be followed by one or
more spaces, a dash, a following space and the name of the alarm.  The
alarm.wmi plugin displays that data in the reversed order:

    ONCE AN HOUR - 01
    ONCE A DAY - 08:02
    ONCE A WEEK - SAT 08:03
    ONCE A MONTH - 24 08:04
    ONCE A YEAR - 11-24 08:05
    ONCE - 12-11-24 08:06

When the given date and time comes the alarm.wmi plugin adds or removes the
space at the end of the suitable entry in the alarm.cfg file, plays the
sound, and wminfo ran with -c switch starts to scroll that line of the text.
The program to play the sound and the sound are defined at the beginning of
the alarm.wmi plugin.

The alarm script edits alarm.cfg database.  Instead of putting the alarm.cfg
database in /usr/local/bin directory it is more convenient to put it in
~/bin directory.  In such a case you can edit text database without root
priviledges and you can store in that file your own alarms.

If you use the localized system and some weekdays names in your language use
the characters out of the range from A-Z to a-z you have to customize the
command that displays the content of the alarm.cfg file.  For example in
Polish the abbreviation for Wed is Śro and the abbreviation for Fri is
Pią.  In such a case you have to include these two characters -- Ś and ą
-- in the following command at the end of the alarm.wmi plugin:

    perl -pe 's/([A-Za-zŚą]* ?[0-9-]* ?[0-9:?]+) +- (.*?)( +)?$/$2 - $1$3/'

and use the proper utf8-iso? filter -- utf8-iso1 is the default.

To display these weekdays names as well as the alarms names in your language
properly you have to run wminfo with -i N switch -- -i 1 is default.

