X11::WM::Sawfish - Perl extension for sending LISP forms to the sawfish window manager for processing.
use X11::WM::Sawfish; my $x = new X11::WM::Sawfish($display); $x->eval_form('(display-message "Foo")');
X11::WM::Sawfish implements the communication protocols used to connect to a running instance of the Sawfish window manager and send LISP forms for evaluation.
The Sawfish window manager is designed around a LISP dialect implemented by librep. As such, configuration can be done with arbitrary LISP forms. This can be in the configuration files, or it can be submitted by external processes with two different communications schemes. The first is with simple UNIX domain sockets. The second scheme is to use the standard X11 properties mechanism to submit LISP forms for evaluation.
To use X11::WM::Sawfish, simply create an instance, which will connect to the Sawfish window manager running on the X server pointed to by the argument. If no argument is given, the
$DISPLAY environment variable will be used. Then use the
eval_form() method to submit LISP forms for evaluation. The scheme used for connection will by default be the UNIX domain socket scheme, unless that method fails (which will only happen if the X server is running on a remote machine) in which case it will fall back to the X properties scheme.
Keep in mind that by default, the X properties scheme is disabled by Sawfish for security reasons. To enable it, the LISP form
(server-net-init) must be evalutated. Make sure that you have secured your X server before you do this, because if you don't, anyone can connect to your Sawfish process and execute arbitrary LISP forms, which would include the ability to execute arbitrary system commands.
Creates a new X11::WM::Sawfish object which will connect to the Sawfish window manager that is running on the X server pointed to by the argument. If the argument is not given, the
$DISPLAY environment variable will be used. If the connection is not able to be created, new will return
undef and set
Takes the LISP form represented by string and submits it to the librep running in the Sawfish process. The results are returned (as a string). If the connection has been closed, it will automatically be reopened.
Attempts to open a connection to the Sawfish process.
Attempts to close the connection to the Sawfish process.
Returns the version number returned by the server when the initial connection was made (during object construction).
Craig B. Agricola, <email@example.com>
Copyright 2003 by Craig B. Agricola
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.