stumpwm.stumpwm-contrib/util/app-menu
2019-11-26 15:49:42 -08:00
..
app-menu.asd Added meaningful descriptions to all non-documented modules 2018-03-15 22:34:26 -04:00
app-menu.lisp Export *app-menu*, and use ASDF's export functionality. 2019-11-26 15:49:12 -08:00
menu-inaction.png Add accurate docs to app-menu. 2019-11-26 15:49:42 -08:00
package.lisp Export *app-menu*, and use ASDF's export functionality. 2019-11-26 15:49:12 -08:00
README.org Add accurate docs to app-menu. 2019-11-26 15:49:42 -08:00

Application menu for StumpWM

/x11-wm/stumpwm.stumpwm-contrib/media/branch/master/util/app-menu/menu-inaction.png

Usage

(load-module "app-menu")

Define app-menu:*app-menu* in your .stumpwmrc. You can use strings to run shell commands or symbols to run Stumpwm commands (e.g. to popup existing application instead of start new one if applcation is already running).

  (defcommand firefox () ()
    "run firefox"
    (run-or-raise "firefox" '(:class "Firefox")))

  (setq app-menu:*app-menu*
        '(("INTERNET"
           ;; submenu
           ("Firefox" firefox)       ; call stumpwm command
           ("Skype" "skypeforlinux") ; run shell script
           )
          ("WORK"
           ("OpenOffice.org"  "openoffice"))
          ("GRAPHICS"
           ("GIMP" "gimp")
           ("Inkscape" "inkscape"))
          ("urxvt" urxvt)
          ("K3B" "k3b")))

Menus can also be loaded from files:

# Run (app-menu-load-menu-file #P"file") to load in this file.
("INTERNET"
 ;; submenu
 ("Firefox" firefox)
 ("Skype" "skypeforlinux"))

Add show-menu command to your keybindings, e.g.:

(define-key *top-map* (kbd "M-`") "show-menu")

Navigate the menu with C-n, C-p, or just start typing to jump to a matching item.