[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7. The Mode Line

The mode line is a bar that runs across either the top or bottom of a head and is used to display information. By default the mode line displays the list of windows, similar to the output C-t w produces.

Alternatively, external panel applications such as the GNOME panel and KDE’s kicker may be used. Simply starting one of these programs is enough to set it as the mode line of the head it would like to be on (if the panel is Xinerama aware) or whichever head is available. In order to avoid problems displaying menus, configure your panel application for positioning at the top or bottom of the head rather than relying on *mode-line-position*

The mode line can be turned on and off with the mode-line command or the lisp function stumpwm:toggle-mode-line. Each head has its own mode line. For example:

;; turn on/off the mode line for the current head only.
(stumpwm:toggle-mode-line (stumpwm:current-screen)

The mode line is updated after every StumpWM command.

To display the window list and the current date on the modeline, one might do the following:

(setf stumpwm:*screen-mode-line-format*
      (list "%w | "
            '(:eval (stumpwm:run-shell-command "date" t))))

(stumpwm:run-shell-command "date" t) runs the command date and returns its output as a string.

Command: mode-line

A command to toggle the mode line visibility.

Function: toggle-mode-line screen head &optional (format (quote *screen-mode-line-format*))

Toggle the state of the mode line for the specified screen

Variable: *screen-mode-line-format*

This variable describes what will be displayed on the modeline for each screen. Turn it on with the function TOGGLE-MODE-LINE or the mode-line command.

It is a list where each element may be a string, a symbol, or a list.

For a symbol its value is used.

For a list of the form (:eval FORM) FORM is evaluated and the result is used as a mode line element.

If it is a string the string is printed with the following formatting options:


List the number of the head the mode-line belongs to


List all windows in the current group windows using *window-format*


List all windows on the current head of the current group using *window-format*


List the groups using *group-format*

The following variables control the color, position, and size of the mode line.

Variable: *mode-line-position*

Specifies where the mode line is displayed. Valid values are :top and :bottom.

Variable: *mode-line-border-width* 1


Variable: *mode-line-pad-x*


Variable: *mode-line-pad-y*


Variable: *mode-line-background-color*


Variable: *mode-line-foreground-color*


Variable: *mode-line-border-color*


Variable: *mode-line-timeout*

The modeline updates after each command, when a new window appears or an existing one disappears, and on a timer. This variable controls how many seconds elapse between each update. If this variable is changed while the modeline is visible, you must toggle the modeline to update timer.

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by David Bjergaard on November 1, 2014 using texi2html 1.82.