Version 4 (modified by, 12 years ago) (diff)

Add a note about colors, adapted from doc/intro.txt

[Much of this documentation is cloned from doc/advanced.txt in the owl repository]

BarnOwl supports an expressive filter language that can be used to describe sets of messages. This language is used both for coloring messages and for selectively viewing subsets of your messages.

The following command will create a filter called 'mail' that maches any messages sent to the zephyr class 'mail':

filter mail class ^mail$

The first argument after the filter command specifies the name of the filter to be created. The text after that indicates that matching messages must have the zephyr class "mail". For help understanding the ^ and $ characters, consult a reference on POSIX regular expressions, such as man 7 regex or an online version. Note that all pattern matching in Barnowl is case-insensitive.

The message fields that can be used in a filter command include:

message sender
message recipient
zephyr class name
zephyr instance name
zephyr opcode
zephyr realm
message body
message type ('zephyr', 'aim', 'admin', ...)
either 'in' 'out' or 'none'\n"
either 'login' 'logout' or 'none'\n"

The info command (bound to i by default) includes a list of “Owl Message Attributes”; Any attribute listed in this area can also be matched on by a filter.

A filter can refer to other filters using the filter command:

filter somefilt filter foo or filter bar

Would match anything in either the foo or bar filters. Recursive filters are explicitly disallowed.

You can also use the operators 'and' 'or' and 'not' as well as the values 'true' and 'false'. Parentheses can be used to group expressions, though there must be spaces present before and after all parenthesis. For example:

filter myfilt ( class ^foo$ ) or ( class ^quux$ and instance ^bar$ )

If you define a filter using a filter name that already exists, it will overwrite the existing filter. This can be a useful way to override the built-in filters.


Every filter can have a color associated with it. Messages matching the filter will then be displayed in that color if your terminal supports it. The color for a filter can be set by using the '-c' option to the filter command. For example:

filter personal -c white

This cause all messages in the 'personal' filter to be displayed in white. Colors can also be set when defining a new filter:

filter mail -c red class ^mail$

Barnowl can also set the background color of zephyr messages, independently of the color of the text. To set the background color for a filter, just use the '-b' option to the filter command. You can produce a list of the colors available to Owl with the command:

show colors

If a message matches more than one filter it will be displayed in the color specified in the last filter listed in the 'show filters' command.

Built-in special filters

Matches all messages
Matches no messages
“personal” messages, messages sent privately to you.
Login/Logout notifications
Messages generated by automated programs
Messages sent from you to another user
AIM messages
Zephyr messages
Twitter messages
Jabber messages
IRC messages
"Trash" messages
Zephyr pings
Messages for which the reply commands should not work

The trash filter is used for the delete trash command (bound to T). That command will mark as deleted (but not expunge) all messages in the trash filter. By default, this filter matches messages on -c mail, admin messages, pings, and login notifications.

The reply-lockout filter can be used to prevent you from accidentally replying to classes you do not want to ever send to. By default it includes class mail and class noc, both of which are used for automatic notifications but which users generally never send to themselves.