-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
[feature] swhks
env var synchronization sequence with swhkd
#183
Comments
@ajanon Hi Alexis, what are your thoughts on this? How do you think we should try implementing this? |
I feel like ideally we could have bidirectional communication between sxhkd and swhkd, and swhkd could then request environment variables values only when needed at runtime, but this may add much more complexity. I am not very familiar with the IPC system we have, so this may be completely off. What do you think? |
Do you mean swhks and swhkd?
In my opinion swhks is a fairly trivial program, we just have a socket that we write commands to, it's nothing more than that, A simple if check for a specially crafted message for requesting environment variables will take little to no effort I believe? |
Yes, that was a typo.
Would you mind taking a shot at implementing this if/when you have some time on your hands then? |
Absolutely! |
While attempting to write a PoC for this a peculiar question came to mind: What if we want to resolve |
The way I see it, the daemon should have as little information as necessary. This decreases complexity in the low level parts of the stack on the privileged process. You mentioned something interesting: instead of parsing the config in the daemon, couldn't we parse the config in the server? This would mean replacing Going further with this: could we pass a message from the daemon to the server for some additional commands? For instance, instead of changing X11 rates inside the daemon, we could just pass it to the server which has all the information it needs available readily. Reloading the config could be similar: instead of having special code in the daemon, we could tell the server to load it and to pass the information back. This may not be what you had in mind. Feel free to discuss or criticize this! |
Yep this works too! we can totally parse the config file in the server and send it back to the daemon according to specially crafted messages. I was thinking of a format such as Do you think this format is clear and concise? We can work on the X11 rate adjustment in swhks too ( |
Note: I think the X11 specific code should be guarded behind a crate feature. |
The message format looks good to me! I agree with you for X11: no need to build this for people who will be using wayland exclusively. I just wondered something after thinking about it: could we load the config in the opposite order? As in, have What do you think? |
If an initiation sequence takes place between the client and the daemon then we can synchronize environment variables into
swhkd
.This has multiple benefits in code such as:
swhkd
is running on and conditionally perform logic such as set repeat rate on X11.Ref: #117
Ref: #76
The text was updated successfully, but these errors were encountered: