xcoke - Show status of the Coca-Cola machine at DIKU

DIKUNIX

xcoke at DIKU was compiled for the HP9000s700 machines by Martin Koch <myth@diku.dk> and Jesper Holm Olsen <dunkel@diku.dk> on 1997-01-29

SYNOPSIS

xcoke [ -nologo ] [ -notext ] [ -notime ] [ -noamount ] [ -nolight ]

DESCRIPTION

xcoke displays various stats about the coke machine at DIKU. The window is separated into 4 parts:

The leftmost part is a standard Coca-Cola logo.

The next part is a set of lights representing the diodes on the front of the actual coke machine. If a diode is off, its corresponding light in the xcoke window appears white, and if the diode is on, the light appears black. The topmost square represents the "Use Correct Change" diode on the coke machine, and the six circles represent column 1 through 6, respectively.

If a diode is lit, the corresponding column is empty. If a diode is not lit, it is only possible to determine that the column is non-empty (which we will term full). It is not possible to determine how many cokes are actually left in each column in the vending machine.

The third part displays a number representing the amount of cokes sold from the column monitored by the light to the left, since it last changed state from empty->full.

The rightmost shows the elapsed time since the particular column changed state from empty->full or full->empty. The format for elapsed time is DAYS-HOURS:MINUTES.

If there is no network connection, or the coke-server is down (the first is by far the most probable), the xcoke-window will become grey, and the use-correct change diode will become half as large as the other diodes :)

Options

xcoke accepts the usual X Toolkit command line options (see X(1)) as well as the following additional options:
-nologo
Don't include the Coca-Cola logo.
-notext
Don't show time or number of cokes sold.

(This is equivalent to -notime -noamount).

-notime
Don't show time since last filled or emptied.
-noamount
Don't show number of items sold.
-nolight
Always show the Coca-Cola-Light column as SOLD OUT!

FILES

xcoke
At DIKU, xcoke can be found in /usr/local/dikunix/bin/xcoke. Please check out the Dikunix home page (http://www.diku.dk/computing/software/dikunix/) and make the appropriate additions to your PATH and MANPATH.

If you are running it under the TWM windows manager (if you don't know what window manager you are running, then you probably are!) you probably want to add "xcoke" to the NoTitle section of your ~/.twmrc file in order to remove the titlebar from the xcoke window.

SEE ALSO

X(1) for the use of the X Toolkit options. The most interesting is probably the -geometry switch, which is used to place the window on the screen. Look in your ~/.xsession and see how for example xbiff is placed, and then tweak the values a bit to suit your needs.

EXAMPLES

Insert the following line in your ~/.xsession, before "xlogout":

/usr/local/dikunix/bin/xcoke -geometry 156x90-1+150 &

BUGS

If you find any bugs or have any suggestions, please send mail to <kantinemaskine@diku.dk>.

AUTHORS

Martin Koch <myth@diku.dk> and Jesper Holm Olsen <dunkel@diku.dk>.


Markup created by unroff 1.0,    January 31, 1997.