-
Notifications
You must be signed in to change notification settings - Fork 185
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 lefthk #682
Integrate lefthk #682
Conversation
@AethanFoot Would this break current configurations and custom keybindings or, will As you can see, I'm rather curious about what this means in practice. Would you mind a slightly deeper walk through? |
So if this is going to be done before the config language change, it will likely not be a breaking change as we would be able to parse the current setup into something lefthk can run (e.g. convert it to leftwm-command ...). With lefthk I took the same approach we want for leftwm, that being the core functionality being a library which others can use to build their own version. So the integration with leftwm will use the core library of lefthk using its own implementation of the config and starting it, etc. This then would allow us to easily place the hotkey daemon shipped with leftwm behind a build flag allowing users to remove the hotkey functionality and use their own hotkey daemon, whether that be sxhkd or lefthk standalone (as the standalone version of lefthk will likely use and build upon more features than the integrated version). There will be (and currently is, but is in very earlier but usable stages) a standalone implementation of lefthk like sxhkd, which as mentioned will likely implement more functionality of the core library and add more to it. |
Thanks for the explanation. |
Would |
We could add chords with toml, it would just take a bit more parsing trickery. |
Ahh riiight, TOML 🙄 |
Never really have checked what happens if you completely remove some of the default keybinds, will this break parsing? If so we should add
|
Ok rebasing didn't give the effect I was expecting. |
This seems to be mostly working. However I am uncertain how we should handle killing lefthk and if lefhk crashes. Also when killed lefthk seems to be leaving ghost processes, I am unsure what is causing this. |
Also to test this you need to completely kill leftwm as there are changes in the binary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny review round 1:
Just a reminder, that we need to update the link to keysym.rs
in the wiki.
I might have been late to review #704 (all-family weekend 🤷🏼♂️), but I have been running on this PR all the last week and haven't found any hiccups or even major problems. (Despite the one thing, that stand-alone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bunch of places, where I stumbled from the simlarity of ̀ leftwmand
lefthk and had to read twico to catch the differnce. This might be just my tired eyes and brains, but maybe we could also avoid some confusion for newcomers if we generalise it as much as possible to ̀ hotkeydaemon
or something along that.
Did I get this right that modmask_lookud.rs
is the only keyboard related tie into ̀ xlib`? Could we feasibly use something display server independant here, already or should we keep this for later, when making the core display server agnostic?
All in all thouhg, another amazing 🪄 Wizzard Aethan PR 😀
Actually, something is wrong. I can not cycle through open windows with the keybindings 😢 Edit by VuiMuich: omit config codeblock, as turned out to be not relevant. |
Ooooh, good catch. I can reproduce. This affects focus and moving windows. @0323pin can you please test if reverting to a0a4e58? I'll have look at this tomorrow. Tbh I suspect more some side effects from some refactors that snuck in unnoticed then it being actually the fault of lefthk. |
This seems to only happen in ClickTo and Driven, and appears to be a lack of update rather than it not happening. Also picom doesn't start when reloading but I suspect that is because we moved the up scripts to before the first loop (maybe we are too fast for it). Edit: Looking over I think it is the EventResponse::Continue causing issues as it is preventing display servers being sent through, which isn't an issue in sloppy as the mouse events are causing us to get through. |
🤔 I thought I put |
I think the continues were related to the select macro rather than the loop |
I'll try to kick another build when I'm home late this evening. Can't promise I'll manage, though. Else, early on Thursday morning, sorry, on mobile at the moment. |
On my system all running fine now. |
@AethanFoot, @VuiMuich All good, everything is working as it should but, ... you knew that already 😉 |
@AethanFoot ❤️ 🥳 |
@0323pin on another note, does zbus still fail to build on netbsd? |
@AethanFoot haven't tried in a while. Easiest if I had something to test build. Would you like me to try building it stand-alone? |
@0323pin Yeah that would be helpful. |
@AethanFoot I'll give it a go after building the new git-head from |
@AethanFoot Ready to test a build of whatever you have in mind 😄
Honestly, I don't know how this is even possible, I don't have |
Oh, and I had to patch
As already mentioned, we don't pull distfiles at compile time, our builds are all done in |
I presume it is good now then, I remember before it wasn't compiling (which u mentioned on future plans issue). Just wanted to check as I was gonna dive into us using dbus for things. Is that zvariant an issue? |
Yeah! Go ahead and dump something to build 🤣
It depends. If there's some functionality that is required, yes. They should release a new version, so we can fetch distfiles before compiling. If, it's just for development, no. I don't mind keeping a patch. |
Oh, btw. |
@AethanFoot Hmm ... the latest changes should warrant a new release. It's miles ahead of 0.3.0. We have a commit freeze coming-up soon. Is there a plan for when 0.4.0 should hit the wild? From our side, within the next few days or, on the last week of this month. |
@AethanFoot there might still be issues with I know it's not the same. In any case what's wrong with |
To my knowledge |
@hertg thanks for the feedback. Hopefully, we won't run into trouble with |
Yeah, again I don't mind either or. To add to @hertg points, is that they have some nice abstractions that make the interfaces easy to setup and interact with through code. These abstractions obviously make it a bit easier on me, but have a greater impact for others working on the code, as the easier it is to understand the more can work on it. Their book shows nicely how to do it from a super low level point (not quite as low as the c-bindings), and how the abstractions are built up, https://dbus.pages.freedesktop.org/zbus/introduction.html . I am thinking of testing this with lefthk first which has lower demands than leftwm. |
Thanks! Do let me know when there's something to test. Hope not to hit the same issue where the application is unable to find |
@AethanFoot Go ahead and implement In case you are interested, here are my thoughts on the debug data. Please do say if I misunderstood it.
|
Pushing this as a discussion point. Until we rewrite the config code, do we want to make this a non-braking change? To do this we would need to parse the BaseCommands into external commands that lefthk can execute. This would block any lefthk commands being able to be used until the rewrite (Reload, Kill, Chord, and ExitChord). Meaning that the user won't see any change from this other than being able to build without the hotkey daemon.
This will be a large pr so any feedback and opinions will be much appreciated.
Thanks!