Add accurate docs to app-menu.

This commit is contained in:
Spenser Truex 2019-11-26 15:49:42 -08:00
parent 317a184683
commit 86ecefc1b0
2 changed files with 18 additions and 4 deletions

View file

@ -1,11 +1,12 @@
** Application menu for StumpWM.
#+TITLE: Application menu for StumpWM
** Usage
[[./menu-inaction.png]]
* Usage
#+BEGIN_SRC lisp
(load-module "app-menu")
#+END_SRC
Define =*app-menu*= in your =.stumpwmrc=. You can use strings
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).
@ -15,7 +16,7 @@ if applcation is already running).
"run firefox"
(run-or-raise "firefox" '(:class "Firefox")))
(setq *app-menu*
(setq app-menu:*app-menu*
'(("INTERNET"
;; submenu
("Firefox" firefox) ; call stumpwm command
@ -30,8 +31,21 @@ if applcation is already running).
("K3B" "k3b")))
#+END_SRC
Menus can also be loaded from files:
#+BEGIN_SRC lisp
# Run (app-menu-load-menu-file #P"file") to load in this file.
("INTERNET"
;; submenu
("Firefox" firefox)
("Skype" "skypeforlinux"))
#+END_SRC
Add =show-menu= command to your keybindings, e.g.:
#+BEGIN_SRC lisp
(define-key *top-map* (kbd "M-`") "show-menu")
#+END_SRC
Navigate the menu with =C-n=, =C-p=, or just start typing to jump to a matching
item.

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB