[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [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-variable. For example, to display a message whenever you switch frames:
(defun my-rad-fn (to-frame from-frame) (stumpwm:message "Mustard!")) (stumpwm:add-hook stumpwm:*focus-frame-hook* 'my-rad-fn) |
Remove the specified function from the hook.
Remove all functions from a hook
Call each function in HOOK.
Call each function in HOOK and pass args to it.
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.
Controls whether hooks will actually run or not
A hook called when a split is removed. the hook is called with the current frame and removed frame as arguments.
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.
A hook called whenever there is a mouse click. Called with 4 arguments, the screen containing the window (or nil if there isn’t one), 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.
A hook called whenever a window sets the property indicating that it demands the user’s attention
A hook called inside stumpwm’s inner loop, before the default event processing takes place. This hook is run inside (with-event-queue ...).
Called before a command is called. It is called with 1 argument: the command as a symbol.
Called after a command is called. It is called with 1 argument: the command as a symbol.
Called after an item is selected in the windows menu. It is called with 1 argument: the menu.
A hook called whenever a head is added. It is called with 2 arguments: the new head and the current screen.
A hook called whenever command mode is ended
A hook called whenever command mode is started
Called whenever the mode-line is destroyed. It is called with argument, the mode-line
A hook called when stumpwm quits.
A hook called when stumpwm restarts.
Called after a :selection-notify event is processed. It is called with 1 argument: the selection as a string.
A hook called when a frame is split. the hook is called with the old frame (window is removed), and two new frames as arguments.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on February 2, 2024 using texi2html 1.82.