stumpwm-devel
[Top][All Lists]
Advanced

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

Re: [STUMP] Prefix-Lock


From: David Bjergaard
Subject: Re: [STUMP] Prefix-Lock
Date: Thu, 27 Mar 2014 12:24:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi David,

(I know that others have replied to this thread, but the topic has
shifted a little from your original post.)

Responses inline:
"J. David Smith" <address@hidden> writes:

> Hey all:
>
> I was demo'ing Stump to a coworker this afternoon and in order to
> cycle through windows it was constantly PREFIX n, PREFIX n, PREFIX n.
> Normally not a big deal, but with 6-7 windows and without having set
> binds for half of them it gets a bit annoying; he picked it up and
> commented on it.
>
> So, here's my idea: Have a binding like PREFIX C-l that locks the
> PREFIX key on. Each time a keychord completes, it'd revert to having
> just PREFIX entered.
>
> For example:
>
> PREFIX C-l
> n
> n
> n
> ESC
>
I (personally) want to have the following behavior:
PREFIX n,
(check if modifier (ie ctrl) is still pressed)

If it is, then the "sticky map" is activated (ie n or p cycles you
through windows).

When modifier is released, return to normal state.  

This would make commands like resizing frames in iresize, or moving
windows much more natural.  Those commands tend to use an awkward number
of prefix presses (or in the case of resize, it hijacks the entire
keymap until you press RET). Unfortunately my idea is harder to
implement than yours, more details below.

> instead of the former. I have a couple of questions about this.
>
> 1) is this a good idea? Any major pitfalls that I'm not seeing?
I agree heartily with your idea. In fact, the way you propose it would
not be difficult at all.  
> 2) if it's a reasonable idea, is there already a built-in way to do
> this?
Yes, you bind a keymap (say *prefix-lock-map*) to the *top-map* to C-l,
then when in that map you have whatever commands you want to be "sticky"
(n p for cycling windows etc) including a binding to ESC that puts you
back on the *top-map* (ie un-sticks the prefix key).  This is already
done in iresize.lisp.
> 3) if it doesn't already exist, what's a good way to go about it?
Read iresize.lisp :).  This could easily start out as a contrib module,
and if there's wider adoption it could be integrated into the core.  
>
> Ideally I'd like to be able to do it on submaps as well (eg s-w s-m is
> my prefix for MPD control).
>
> -- David
>

Cheers,

    Dave



reply via email to

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