Chapter 6. Application Keyboard Shortcuts

larswm contains a couple of features that makes it possible to set up your X environment in a way similar to the plan9 Acme or UNIX wily environments. Whenever an application is launched from a keyboard shortcut, a few environment variables are set before executing the application.

WM_SELTEXT

The primary selection, as a string.

WM_SELID

The window id of the window that is the owner of the primary selection.

WM_SELNAME

The WM_NAME of the window that is the owner of the primary selection.

WM_SELICONNAME

The WM_ICON_NAME of the window that is the owner of the primary selection.

WM_FOCUSID

The window id of the currently focused window.

WM_FOCUSNAME

The WM_NAME of the currently focused window.

WM_FOCUSICONNAME

The WM_ICON_NAME of the currently focused window.

The variables above will be set if the data is available, otherwise they will be left unset.

Please see the file sample.editor, included in the source tarball and in the RPM. It shows how to make a script that launches an editor on a file that is highlighted in an xterm. That is just one example of what can be done with this. The sample.larswm contains another, that opens a manual page on a highlighted word.