dotfiles/stumpwm/modules/bind/README.org

1.0 KiB

Bind Key

Slightly less clunky that the standard method for key binding. Influenced by Emacs' bind-key, but not nearly as powerful or feature rich. This is just a couple of pretty basic macros..

Usage

  (load-module "bind")

The syntax is as follows:

  (bind:key
   ,*key-map*
   ("C-M-z" "some-amazing-stumpwm-command")
   ("C-M-y" "some-other-amazing-stumpwm-command"))

Examples

To bind Emacs to <Super> + e & XTerm to <Super> + t in the *top-map*, would look like this:

  (bind:key
   ,*top-map*
   ("s-e" "exec emacs")
   ("s-t" "exec xterm"))

To do something similar in the *root-map*:

  (bind:key
   ,*root-map*
   ("e" "exec emacs")
   ("t" "exec xterm"))

<Tab> and <Shift+Tab> to go down and up menus.

  (bind:key
   ,*menu-map*
   ("TAB" 'menu-down)
   ("ISO_Left_Tab" 'menu-up))