[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
StumpWM exports a number of hooks you can use to add customizations; like
hooks in Emacs, you add to a hook with the add-hook
function. for
example:
(stumpwm:add-hook 'stumpwm:*new-window-hook* 'my-new-window-custos) |
adds your my-new-window-custos
function to the list of functions
called when a new window appears.
Add function to the hook hook-variable. For example, to display a message whenever you switch frames:
(defun my-rad-fn (from-frame to-frame) (stumpwm:message "Mustard!")) (stumpmwm:add-hook stumpwm:*focus-frame-hook* 'my-rad-fn) |
Remove the specified function from the hook.
The following hooks are available:
A hook called whenever a window is added to the window list. This includes a genuinely new window as well as bringing a withdrawn window back into the window list.
A hook called whenever a window is destroyed or withdrawn.
A hook called when a window is given focus. It is called with 2 arguments: the current window and the last window (could be nil).
A hook called whenever a window is placed by rule. Arguments are window group and frame
A hook called when stumpwm starts.
A hook called inside stumpwm's inner loop.
A hook called when a frame is given focus. The hook functions are called with 2 arguments: the current frame and the last frame.
A hook called when a new frame is created. the hook is called with the frame as an argument.
A hook called whenever stumpwm displays a message. The hook function is passed any number of arguments. Each argument is a line of text.
Called when a top level error occurs. Note that this hook is run before the error is dealt with according to *top-level-error-action*.
A hook called whenever stumpwm switches groups. It is called with 2 arguments: the current group and the last group.
A hook called whenever a key under *top-map* is pressed. It is called with 3 argument: the key, the (possibly incomplete) key sequence it is a part of, and command value bound to the key.
A hook called whenever there is a mouse click on the root window. Called with 4 arguments, the screen containing the root window, the button clicked, and the x and y of the pointer.
Called whenever the mode-line is clicked. It is called with 4 arguments, the mode-line, the button clicked, and the x and y of the pointer.
[ < ] | [ > ] | [ << ] | [Plus haut] | [ >> ] | [Top] | [Table des matières] | [Index] | [ ? ] |
Ce document a été généré par Eric Reinbold le 9 Octobre 2008 en utilisant texi2html 1.78.