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

Client Filters

The module plwm.cfilter defines a number of client filters. These filters can be called with a client as an argument, and returns true if the client matches the filter, or false otherwise. Extension modules can then provide customization with client filters, allowing the user to give certain clients special treatment.

Currently, the following filters are defined:

Filter: true
Filter: all

These filters are true for all clients.

Filter: false
Filter: none

These filters are false for all clients.

Filter: is_client

True if the object is a wmanager.Client instance.

Filter: iconified

True if the client is iconified.

Filter: mapped

True if the client is mapped, the opposite of iconified.

Filter: name ( string )
Filter: re_name ( regexp )
Filter: glob_name ( pattern )

These filters are true if the client resource name or class is exactly STRING, or matches the regular expression regexp or the glob pattern pattern.

Filter: title ( string )
Filter: re_title ( regexp )
Filter: glob_title ( pattern )

These filters are similar to the name filters above, but matches the client title instead.

These basic filters can then be assembled into larger, more complex filters using the following logical operations:

Filter: And ( filter1, filter2, ..., filterN )

True if all of the subfilters are true.

Filter: Or ( filter1, filter2, ..., filterN )

True if at least one of the subfilters is true.

Filter: Not ( filter )

True if filter is false.

Here are some examples of compound filters:

# Match any client that isn't an Emacs


# Match an iconified xterm:

And(iconified, name('XTerm'))

# Match an xterm with a root shell (provided that the shell
# prompt sets a useful xterm title)

And(name('XTerm'), re_title(r'\[root.*\]'))

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