-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate keychord patch to support multi-layered keybindings #33
Comments
I attempted to replicate what I implemented in My code changes are captured in a changes.diff file, because I already have an existing dwl fork (GitHub limitation). My overall changes and notes
Issues that I couldn't solve
Thanks for this project. I tried Guix few days ago and your "home services" projects helped me understand quickly few concepts. I'm hoping switch to dwl-guile on Guix and this issue is the only blocker for me. |
Hi, that's very nice to hear!
I think this is because a key sequence can not only consist of a modifier without an actual key. An easy solution would be to just keep track of which "layer" we are currently parsing, and allow sequences without a key for layers > 0.
As you may have seen, I decided to use I'll have a look at adding these changes to the main branch, hopefully sometime this weekend. Thanks! |
I have integrated the keychord patch into the main branch, so feel free to have a look and check if everything works as expected @yveszoundi. The issue with parsing
|
Thanks a lot, this is much appreciated. I'll start playing with it and I'll report back soon. By the way, I did manage to do it myself, (the "quick and dirty way"), with some limitations:
|
It looks good to me @Frewacom, great work.
I can now switch to My dwl-guile configuration for reference(setq inhibit-defaults? #t)
(dwl:set-tty-keys "C-M")
(set-layouts 'default "[M]" 'dwl:monocle
'tile "[]=" 'dwl:tile)
(set-keys "C-t <return>" '(dwl:spawn "bemenu-run" "-l" "10")
"C-t c" '(dwl:spawn "foot")
"C-t n" '(dwl:focus-stack 1)
"C-t p" '(dwl:focus-stack -1)
"C-t [" '(dwl:change-masters -1)
"C-t ]" '(dwl:change-masters 1)
"C-t [50] S-[" '(dwl:change-master-factor -0.05)
"C-t [50] S-]" '(dwl:change-master-factor 0.05)
"C-t <tab>" '(dwl:cycle-layout 1)
"C-t <left>" '(dwl:focus-monitor 'DIRECTION-LEFT)
"C-t <right>" '(dwl:focus-monitor 'DIRECTION-RIGHT)
"C-t <up>" '(dwl:focus-monitor 'DIRECTION-UP)
"C-t <down>" '(dwl:focus-monitor 'DIRECTION-DOWN)
"C-t [50] S-<left>" '(dwl:tag-monitor 'DIRECTION-LEFT)
"C-t [50] S-<right>" '(dwl:tag-monitor 'DIRECTION-RIGHT)
"C-t [50] S-<up>" '(dwl:tag-monitor 'DIRECTION-UP)
"C-t [50] S-<down>" '(dwl:tag-monitor 'DIRECTION-DOWN)
"C-t k" 'dwl:kill-client
"C-t `" 'dwl:zoom
"C-t [62] S-e" 'dwl:toggle-fullscreen
"C-t [62] S-<space>" 'dwl:toggle-floating
"C-t q" 'dwl:quit
"C-t <escape>" 'dwl:quit
"C-<mouse-left>" 'dwl:move
"C-<mouse-middle>" 'dwl:toggle-floating
"C-<mouse-right>" 'dwl:resize
"C-t 1" '(dwl:view 1)
"C-t 2" '(dwl:view 2)
"C-t 3" '(dwl:view 3)
"C-t 4" '(dwl:view 4)
"C-t 5" '(dwl:view 5)
"C-t 6" '(dwl:view 6)
"C-t 7" '(dwl:view 7)
"C-t 8" '(dwl:view 8)
"C-t 9" '(dwl:view 9)
"C-t [62] S-1" '(dwl:tag 1)
"C-t [62] S-2" '(dwl:tag 2)
"C-t [62] S-3" '(dwl:tag 3)
"C-t [62] S-4" '(dwl:tag 4)
"C-t [62] S-5" '(dwl:tag 5)
"C-t [62] S-6" '(dwl:tag 6)
"C-t [62] S-7" '(dwl:tag 7)
"C-t [62] S-8" '(dwl:tag 8)
"C-t [62] S-9" '(dwl:tag 9))
|
Nice! I am not entirely familiar with the autostart patch, but it is also possible to do something like this via Guile by adding a function to the startup hook (you can check the man page or dscm/init.scm on how to add it). |
Because the I have now transitioned to a startup hook which is much better. Thanks! |
Config syntax could look like:
where each "layer" is separated by a space, just like in Emacs.
Patch can be found here: https://github.com/djpohly/dwl/wiki/keychord
The text was updated successfully, but these errors were encountered: