stumpwm-devel
[Top][All Lists]
Advanced

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

Sv: Spatial groups refactored as a module


From: Shostek
Subject: Sv: Spatial groups refactored as a module
Date: Sun, 13 Mar 2022 21:58:07 +0000 (UTC)

Ah, sorry what I'm referring to is the (perhaps poorly documented) way top maps 
are handled. There is one general *top-map*, but there is also a 
*group-top-map*, *float-group-top-map*, etc., which define top level 
keybindings for various groups. By default they all just contain their 
respective root map bound to the prefix key, but if you for example wanted some 
keybindings active in only floating groups you could define them in the 
floating groups top/root maps. These maps are returned by the function 
#'top-maps if I recall correctly (I don't have my pc in front of me). I was 
suggesting that such a setup could be used with the spatial groups to have a 
canonical place for bindings related to the spatial groups.

Cheers,
Sz

13. mar. 2022 22:51:58 Tim Cross <theophilusx@gmail.com>:

> 
> 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]