Skip to content


Repository files navigation


ruler is a program used for creating rules like in some window managers, like i3 or bspwm.

Rules are commands that are associated with a set of window properties (descriptors). When a window is created, ruler executes all rules whose descriptors match the properties of a window.

Descriptors can be defined as regular expressions (POSIX Extended Regular Expressions) to avoid code repetition.

Commands are executed asynchronously by default. If a command is prefixed with a semicolon, it will be run synchronously.

For more information, see the included manual page (ruler(1)).

Example configuration

# move all browsers to workspace 2
	wtf "$RULER_ID" && waitron group_add_window 2

# drop a notification if a window containing that fifth glyph is born
	echo "warning!" > /tmp/notifyd.fifo


Build time dependencies:

  • a yacc implementation (GNU bison, OpenBSD yacc etc.)
  • a lex implementation (flex)

Building and installing

$ make
# make install

The Makefile respects the DESTDIR and PREFIX environment variables.