stumpwm-devel
[Top][All Lists]
Advanced

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

Re: Sv: Spatial groups refactored as a module


From: Tim Cross
Subject: Re: Sv: Spatial groups refactored as a module
Date: Mon, 14 Mar 2022 08:33:09 +1100
User-agent: mu4e 1.7.9; emacs 28.0.91

Shostek <szos@posteo.net> writes:

> Sorry, I don't think I expressed what I meant well. I agree that a function
> setting up default bindings should be present, but think it could be cleaner 
> if
> the bindings were enabled by default in a root map hanging from a new top map
> specifically for spatial groups. Then the function to install the default
> bindings at the top map level would install them to this new top map, and all
> user bindings could be defined there as well.
>

I think I understood, but perhaps I'm confused by your use of *top-map*
and *root-map*. My understanding is that *top-map* is the highest
keymap. By default, the only key bound in this map is C-t, which is
bound to the *root-map*. To get to any key bindings defined in the root
map, you have to first enter C-t. If you use set-prefix-key, the
*root-map* is bound to the new prefix key in the *top-map*. 

If you were to put the bindings in their own keymap, you also need to
have a prefix key to bind that keymap, so as a minimum, two key
presses to execute any of the actions (assuming it is bound to the
*top-map*, 3 if bound to the *root-map*).

For moving around windows/groups/frames, I think you want as few key
presses as possible i.e. you want it bound directly in the *top-map*,
but things bound in this map must not conflict with 'normal' bindings
for applications, which is why I find super (windows key) to be a good
prefix. I only use Linux and the super key is rarely used by
applications on Linux.

Using a function which directly binds the movement functions to the
*top-map* allows movement to be triggered with one key press. Yes, it is
perhaps less 'clean' than having a new keymap which you could bind to a
prefix of your choice, but avoids the problem of movement now requiring
more key presses.

Of course, if you don't mind having to use two key presses to move
around windows/groups/frames, using a keymap is clean and it would make
it possible to define a function to allow the user to select/change the
*top-map* prefix, but I suspect most people will prefer single key press
movement. 



reply via email to

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