ratpoison supports command line arguments to request various actions when invoking ratpoison.
-h, --help
-v, --version
-d, --display
-s, --screen
-c, --command
-c
option you can script
ratpoison using any programming language that can spawn a
process. Some commands behave differently when invoked this
way. Currently the only commands that behaves differently are the
windows
command and some def* commands. Instead of displaying
the window list in a message window, it is printed to stdout. The
output can then be captured and used in the ratpoison script. For
instance, this could be used to check whether a program is running and
if it is switch to its window otherwise launch it.
It should also be noted that multiple -c
options can be used.
$ ratpoison -c split -c split
Here ratpoison would split the current frame twice.