KAROLARM(1) OpenBSD Reference Manual KAROLARM(1)

NAME

karolarmmonitor the state of your games at karopapier.de

SYNOPSIS

karolarm [-a] [-b brokeninterval] [-i interval] [-s sound] [user]

DESCRIPTION

The karolarm utility polls karopapier.de for pending games of user at the given interval. If no user is specified, the local (unix) user id will be used instead. When there is at least one pending game, karolarm writes a notification to all ttys currently owned by the user that are group writable, or, if the -a option is specified, to all ttys owned by the user, even to those that are not group writable.

No additional notifications will be sent unless at least one intermediate poll resulted in no pending games or a SIGHUP has been sent to karolarm or the number of pending games increases right after it decreased (i.e. if the user played some games while at the same time getting more pending games). The latter heuristic tries to circumwent situations where you work through all pending games, then close your browser, and then get another pending games within less than interval seconds, without karolarm noticing that the number of pending games was 0 for a short time.

If an error occurs during polling, the interval is temporarily changed to brokeninterval to avoid spamming the user in case karopapier.de suffers from temporar outages.

karolarm will exit if there are no more ttys owned by the user (probably because the user has logged out).

Standard options are as follows:

-a
Write notifications to all ttys, even if they are not group writable.
-b brokeninterval
Temporarily used interval after polling failed. The default brokeninterval is 300 seconds.
-i interval
Poll at the given interval (in seconds). The default interval is 15 seconds.
-s sound
Play the given sound instead of letting all terminals beep. To get a list of available sounds, use ? (a question mark) for sound. Multiple -s arguments may be given, in which case all required sounds will be played in sequence. Add one -s term argument, to get the terminal beep in addition to the selected sounds.

EXAMPLES

Let karolarm notify you whenever there are pending games for the karopapier user “Crash King” (the quotes are needed because the name contains a space character):

$ karolarm 'Crash King' &

Note that it is usually safe to run karolarm in the background.

If your unix account is the same as the karopapier user you want to watch, you can omit the username. For example, if your unix account is “kili”, the following two lines are equivalent:

$ karolarm &
$ karolarm kili &

If you want to be notified really fast, specify an interval shorter than the default interval of 15 seconds:

$ karolarm -i 5 &

To let a running karolarm send another notification after the current interval (if there still are pending games), just send it a SIGHUP signal:

$ karolarm &
$ karopid=$!
...
$ kill -HUP $karopid

SEE ALSO

mesg(1)

AUTHORS

Matthias Kilian <kili@openbsd.org>

BUGS

The heuristic for detecting short periods of 0 pending games may trigger spurious notifications when new pending games come in faster than you can work through your game list.
January 18, 2015 OpenBSD 5.6