stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [STUMP] *apps-map*, to make more room for program shortcuts


From: David Bjergaard
Subject: Re: [STUMP] *apps-map*, to make more room for program shortcuts
Date: Fri, 20 Feb 2015 14:49:27 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

I like the idea, but I think for many C-t e may be a significant
change.  I would suggest either:
- Change the default key to bind the keys off of (ie not e)
- Allow this functionality, but don't give it a default key

I prefer the latter.  Then the user has a choice.  

Cheers,

    Dave

Edward Trumbo <address@hidden> writes:

> I prefer keyboard shortcuts to menus when it comes to launching
> programs, but StumpWM's many default bindings already take up so many of
> the ones I want. It occurred to me that if we already have a *group-map*
> to hang group-related keybindings off of a prefix key, why not try the
> same thing for users to map shortcuts to applications?
>
> I've patched my StumpWM's bindings.lisp to include an *apps-map* and
> assigned it to my equivalent of "C-t e". OK, I can already hear the
> bellowing from the crowd, "That's our Emacs key, you fool! You fiend!"
> Bear with me a moment; Emacs is still there on "C-t e e", just like
> XTerm is on "C-t e c". The Ctrl-chorded versions are still there like
> always. But by using an extra key to put us into an *apps-map*, we free
> up so many more keys users can bind as shortcuts to favorite programs,
> without shadowing important StumpWM keys or resorting to menus.
>
> I'll include the patch here so you can see what it looks like, though at
> this point I'm more interested in feeling out interest than in seriously
> submitting it. So what do you all think -- an idea worth pursuing (as-is
> or with changes) or drop it?
>
> ---
>  bindings.lisp | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/bindings.lisp b/bindings.lisp
> index 83c9593..f8186c3 100644
> --- a/bindings.lisp
> +++ b/bindings.lisp
> @@ -25,7 +25,8 @@
>  (in-package #:stumpwm)
>  
>  (export '(*groups-map*
> -          *movement-map* 
> +          *movement-map*
> +          *apps-map*
>            *help-map*
>         set-prefix-key))
>  
> @@ -43,6 +44,9 @@ C-t.")
>  (defvar *exchange-window-map* nil
>    "The keymap that exchange-window key bindings sit on. It is bound to 
> @kbd{C-t x} by default.")
>  
> +(defvar *apps-map* nil
> +  "The keymap that application related key bindings sit on. It is bound to 
> @kbd{C-t e} by default.")
> +
>  (defvar *help-map* nil
>    "Help related bindings hang from this keymap")
>  
> @@ -78,9 +82,8 @@ from most specific groups to most general groups.")
>    *escape-key* '*root-map*)
>  
>  (fill-keymap *root-map*
> -  (kbd "c")   "exec xterm"
>    (kbd "C-c") "exec xterm"
> -  (kbd "e")   "emacs"
> +  (kbd "e")   '*apps-map*
>    (kbd "C-e") "emacs"
>    (kbd "b")   "banish"
>    (kbd "C-b") "banish"
> @@ -233,6 +236,9 @@ from most specific groups to most general groups.")
>               (kbd "j")     "exchange-direction down" 
>               (kbd "l")     "exchange-direction left" 
>               (kbd "h")     "exchange-direction right")    
> +(fill-keymap *apps-map*
> +  (kbd "e") "emacs"
> +  (kbd "c") "exec xterm")
>  (fill-keymap *help-map*
>    (kbd "v") "describe-variable"
>    (kbd "f") "describe-function"
> -- 
> 1.8.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]