-
Notifications
You must be signed in to change notification settings - Fork 0
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
Expose the UNIX socket as public API #1
Comments
Hi @MaxVerevkin, thanks for the feedback! I only finished the socket implementation last night and it's a simple JSON protocol over the wire. I didn't even know there would be any interest in the inner workings of it, but now that I know that there is I'll try to make it more future proof and document it so other utilities could make use of it. |
I moved all the types to the Let me know what you think. Note that there were a few breaking changes on The default socket path was changed to The JSON message schema was changed a bit, this shouldn't matter as long you upgrade to the latest version. All of this shouldn't matter as long as you upgrade, but you might want to delete the |
Thanks,
That will definitely be useful for something like a status bar. |
By the way, shouldn't the response temperature and brightness be numbers instead of text? |
I've found that in practice it's better to pass numbers as formatted strings, due to the differences in parsing libraries used by various programming languages. Integers, floats and doubles are all formatted in the same way and the JSON spec deliberately leaves out any details about how numbers should be parsed. Hence I decided to transfer numbers as strings so that we can ensure there's no uncontrollable data loss due to this implicit conversion by the various parsers. For more details see https://stackoverflow.com/a/38357877 |
Oh, okay, didn't know this is a popular technique. |
Added support in the experimental branch of |
That's awesome! Mind sharing the link to your branch? :) Just curious, which bar are you using with |
Sure: https://github.com/greshake/i3status-rust/tree/async (docs are not hosted yet, but can be generated with
I'm using
I've never used |
Thanks for sharing!
I use |
First of all, thanks for this project! Finally there is a tool to change the temperature without flickering under wayland.
The README mentions that daemon and clients communicate via unix socket. It would be really nice if the API to communicate with this socket was public and documented, in which case status bars like
i3status-rust
could directly communicate with the daemon.The text was updated successfully, but these errors were encountered: