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

13.2 Menus

There are three different types of menus in StumpWM; single selection menus; interactive menus; and batch menus. Single-selection menus, as the name suggests, are used to pick a single item from a list. Interactive menus are used for marking multiple selections. Batch menus are used for performing actions on multiple menu items. Both batch and interactive menus share the same navigational keybindings, which are found in the table below. These can be customized by modifying the *menu-map* variable. Commands specific to each menu type can be modified by *single-menu-map* and *batch-menu-map*.

C-p
Up
k

Highlight the previous menu option.

C-n
Down
j

Highlight the next menu option.

S-Down

Scroll the entire page down one entry.

S-Up

Scroll the entire page up one entry.

PageUp

Scroll up one page.

PageDown

Scroll down one page.

C-g
ESC

Abort the menu.

In addition, you can customize the number of items shown at a time (a page) with the *menu-maximum-height* variable. The default value, nil, means that there is no limit to the page size.

Variable: *menu-map*

The keymap used by the interactive menu.

Function: menu-page-up menu

Move a whole page down in the menu

@ menu-page-up

Function: menu-page-down menu

Move a whole page up in the menu

@ menu-page-down

Function: menu-up menu

Move menu cursor up

@ menu-up

Function: menu-down menu

Move menu cursor down

@ menu-down

Function: menu-scroll-up menu

Scroll the menu up

@ menu-scroll-up

Function: menu-scroll-down menu

Scroll the menu down

@ menu-scroll-down

Function: menu-abort menu

What to do when exiting the menu without results. Must signal :menu-quit with the result.

@ menu-abort

Function: menu-backspace menu

What occurs when backspace is pressed in a menu

@ menu-backspace

Function: menu-entry-apply menu-entry function

Apply FUNCTION to the data portion of the menu entry.

@ menu-entry-apply

Function: menu-entry-display menu-entry

Generates a string suitable for displaying in a menu

@ menu-entry-display

Function: menu-finish menu

What to do when exiting the menu with results. Must signal :menu-quit with the result.

@ menu-finish

Function: command-menu screen items command-list &key (prompt Select:) (initial-selection 0) extra-keymap

Use batch-menu to make selections and run commands specified in command-list.

SCREEN: The screen to display the menu on.

ITEMS: The items to be shown in the list. This is expected to be a list of menu-items.

COMMAND-LIST: A list of entries defining the commands associated with each mark. Only marks that are defined are allowed in the menu. The format for these entries is (mark-character function calling-options).

Available calling-options: :single (Default) Each value is passed separately to the supplied function. :all all values selected with this mark are passed to the function in a list.

Example: ’((#d ’delete-window) (#m ’move-multiple-windows :all))

@ command-menu


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

This document was generated on January 28, 2024 using texi2html 1.82.