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

14.2.1 Single Selection Menus

Single selection menus can be searched; start typing when the menu is active, and the results are immediately filtered. Use <RET> to selected the highlighted option.

RET

Select the highlighted option.

Variable: *single-menu-map*

The keymap used by single selection menus in addition to *menu-map*

Function: select-from-menu screen table &optional prompt initial-selection extra-keymap filter-pred

Default Values:

  prompt             "Search:"
  initial-selection  0
  extra-keymap       nil
  filter-pred        #'stumpwm::menu-item-matches-regexp

Prompt the user to select from a menu on SCREEN. TABLE can be a list of values or a nested list. If it’s a nested list, the first element in the sublist is displayed in the menu. What is displayed as menu items must be strings.

EXTRA-KEYMAP can be a keymap whose bindings will take precedence over the default bindings.

FILTER-PRED should be a a function returning T when a certain menu item should be visible to the user. It should accept arguments

ITEM-STRING (the string shown to the user), ITEM-OBJECT (the object corresponding to the menu item), and USER-INPUT (the current user input). The default is MENU-ITEM-MATCHES-REGEXP. Returns the selected element in TABLE or nil if aborted.


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

This document was generated on February 2, 2024 using texi2html 1.82.