You are not logged in.
I use stumpwm as my window manager, in large part because of the way you interact with the WM (hit Ctrl+T, release, then another key). The only applications/WMs I know of that use this style of keybinding are tmux, screen, ratpoison, stumpwm, and cagebreak.
Are there other WMs/compositors that use this style? Or can any WM/compositor (niri for example) be made to use it? A vim-style scheme would also work, where you could switch between a "WM mode" and an "application mode" (similar to vim's normal and insert modes).
I can't stand programs, and WMs in particular, that uses keybindings where you have to hold e.g. Super+Shift+C to accomplish a task, hence the question. StumpWM is great but I'd like to be able to use others too.
Offline
emacs… (duck and cover ;P)
You could try to leverage the https://wiki.archlinux.org/title/Xorg/K … ompose_key or https://wiki.archlinux.org/title/Input_remap_utilities like keyd to map sequences to unavailable symbols and bind those as regular shortcuts
(XCompose will only generate keypresses, whether your preferred WM is ok with that, you'll have to figure)
I can't stand programs, and WMs in particular, that uses keybindings where you have to hold e.g. Super+Shift+C to accomplish a task
Are you looking for https://wiki.archlinux.org/title/Access … _xserverrc ?
Offline
emacs… (duck and cover ;P)
Heresy! ![]()
I doubt the compose key will help with this as in most cases I'd have to "hold" it together with other keys. In fact I already use it to insert special letters in my language.
keyd and sticky keys sound promising though, I'll see if I can make either work in a nice way. Thanks a lot! Of course, further ideas are most welcome.
Offline
in most cases I'd have to "hold" it together with other keys
Humm ??
I've set the Multi_key to the otherwise useless caps lock ("setxkbmap -o compose:caps" res. the xorg config option) and press and release caps, g, l to produce λ - no holding anything.
Edit: about the vim approach, you could use different keyboard layouts and switch between them to enter regular/WM mode.
One pitfall with both approaches can be how the WM exactly allocates shortcuts and whether it responds to layout switches (eg. if it maps symbols to key and grabs those blindly and or maintains the grab situation across layout switches - this is unfortunately not all that uncommon. keyd should™ underrun those issues, though)
Last edited by seth (Yesterday 20:41:11)
Offline
Any WM or compositor that has user defined key bindings could do this so long as you have some other simple utility that manages the key bindings. You'd have one WM-level key binding (e.g., Ctrl-T) that would run the helper program; the helper grabs the keyboard and waits for one key press, then handles the binding for that key.
I'm sure such programs already exist, but I can't name any off the top of my head. I know that for X11 it would take about a dozen lines of C code to implement this, but for wayland it borders on the impossible.
EDIT: but see below for the significant limitation of this for some WMs.
Last edited by Trilby (Yesterday 20:50:47)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Using a helper though implies that @nbqr doesn't want/need to manipulate the internal state of the WM or the WM allows remote controlling, though?
Offline
I use stumpwm as my window manager, in large part because of the way you interact with the WM (hit Ctrl+T, release, then another key). The only applications/WMs I know of that use this style of keybinding are tmux, screen, ratpoison, stumpwm, and cagebreak.
Ion3/notion
The original is dead; the sequel is strictly for the die-hard fans. An incredibly useful feature.
Offline
I've set the Multi_key to the otherwise useless caps lock ("setxkbmap -o compose:caps" res. the xorg config option) and press and release caps, g, l to produce λ - no holding anything.
Ah, I think I misunderstood you. What you're suggesting is that I map e.g. "¤" (Compose, O, X) to some WM action, right? Also, I didn't know that you could release the compose key to produce the same effect - I thought you had to do (e.g.) Compose+O, X.
This is an interesting idea, though it limits me to the (admittedly many) characters that are available from the compose key. As mentioned I already use the compose key for its intended purpose, so there's a risk of clashes.
Side note: Compose, G, L does not produce λ for me. I can do Compose, M, U to get µ though.
Any WM or compositor that has user defined key bindings could do this so long as you have some other simple utility that manages the key bindings. You'd have one WM-level key binding (e.g., Ctrl-T) that would run the helper program; the helper grabs the keyboard and waits for one key press, then handles the binding for that key.
Some kind of hotkey daemon like sxhkd could be useful. I'll see if I can make this work. Perhaps I can can configure it such that the helper is invoked with something like Ctrl+T, and the helper then sends Super+Shift+Rightarrow when I press L (or whatever, you get my point). If you have suggestions for helpers, especially for Wayland, that'd be great!
Ion3/notion
Oh, I didn't know Notion could do this. I'll try it out. Thanks!
Offline
Side note: Compose, G, L does not produce λ for me. I can do Compose, M, U to get µ though.
No, that's part of my personal .XCompose ![]()
I can also
<Multi_key> <b> <b> <q> : "[quote][/quote]"
<Multi_key> <b> <b> <c> : "[code ][/code ]" ![]()
especially for Wayland
keyd - it's already questionable to what extend XCompose will work on wayland™, but shortcut daemons that are not the compositor itself are pretty much out of the cards.
Offline
Side note: Compose, G, L does not produce λ for me. I can do Compose, M, U to get µ though.
No, that's part of my personal .XCompose
I can also<Multi_key> <b> <b> <q> : "[quote][/quote]" <Multi_key> <b> <b> <c> : "[code ][/code ]"
especially for Wayland
keyd - it's already questionable to what extend XCompose will work on wayland™, but shortcut daemons that are not the compositor itself are pretty much out of the cards.
Brilliant! This could be the answer to my question (though I'll have to try it out first of course, will mark this as solved if it works well). I didn't know you could customize the compose key. Also according to this forum thread this should work on Wayland too.
Btw, those are some useful additions for a frequent forum user
And it opens up a lot of possibilities for me, for example I might add some LaTeX stuff to the compose key, that way it'll work both in Vim and Overleaf - awesome!
Thanks a lot for the ideas. If someone has other ideas I'm all ears, of course.
Offline
nb. that wayland is a fragmented ecosystem - just because kwin_wayland handles XCompose doesn't mean random_other_compositor does.
If it does you actually stand better chances for the XCompose approach to work than on X11 since most™ shortcut daemons will go for a passive XGrabKey instead of filtering XGrabKeyboard to implement "shortcuts" (the concept itself doesn't exist in X11) and the former operates on the keycodes. Trilby's suggestion would side-step that, provided you're not seeking to manipulate internal states of the WM w/ those shortcuts (eg. resizing etc. can be done via wmctrl and xdotool on at least NETWM compliant WMs)
libinput or evdev filters like keyd otoh will create an entire new virtual key that should™ work completely independent and across WMs and display servers.
Offline