Go to the first, previous, next, last section, table of contents.

mw_biff Extension Module

This module provides two different mail notifications mixins, which both use the mode windows and beeping for notification. They assume that new mail is stored in $MAIL, and removed from it when read. This works well with the behaviour of Gnus with the nnmail backend.

When $MAIL is empty or non-existent, no message is displayed. When new mail arrives the message `New mail' is displayed, and the speaker beeps. If $MAIL is accessed without being emptied, the message is changed to `Mail'. When $MAIL is emptied, the message is removed again.

The messages can be changed with X resources. The X resource with name plwm.modewindow.newMail.text and class Plwm.ModeWindow.NewMail.Text controls the new mail message, and the resource with name plwm.modewindow.Mail.text and class Plwm.ModeWindow.Mail.Text controls the mail exists message.

Changing the mail exists message to `' could be useful if one uses a mail client that leaves read mail in $MAIL.

WindowManager Mixin: ModeWindowBiff

Displays a mail notification message in all mode windows.

Instance Variable: ModeWindowBiff mw_biff_position

The position of the mail message in the mode window, default 0.0.

Instance Variable: ModeWindowBiff mw_biff_justification

The justification of the mail message, default is modewindow.LEFT.

If the mailspool is mounted over NFS, it might be unadvisable to access it from the window manager. If the NFS server should freeze, the entire window manager would be unusable until the server recovers. Therefore a threaded biff mixin is provided:

WindowManager Mixin: ThreadedModeWindowBiff

This subclasses ModeWindowBiff, with the change that access to $MAIL is done in a separate thread. As PLWM certainly isn't thread-safe, all interaction with the rest of the window manager modules is done in the main thread. Communication between the mailspool access thread and the main thread is done without locks or semaphores. The main thread polls at regular intervals whether the access thread has finished yet, and if so, updates the mode window. This uses the property of Python threading that only one thread at a time may access Python objects. If this would ever change, this class might break.

Go to the first, previous, next, last section, table of contents.