Open qwepoizt opened 3 years ago
@jonls has raised several interesting interesting discussion points (thanks!), which I am addressing here:
I would be happy for my changes being merged to upstream, so they are available to all redshift users! (However, this is not a requirement for the success of my thesis.)
I agree! Simplifying maintainability is part of my goals (e.g. by reducing project size by replacing custom config parsing with libelektra)
Great remark, I will be mindful of that.
Signals will not be an issue, especially since libelektra will only be used to transfer configuration changes between redshift and redshift-gtk (e.g. location coordinates). Other data transfer (e.g. current color temperature) will not be transfered via libelektra.
I've discussed this with @markus2330 who has pointed out that:
libelektra solves some similar problems as D-Bus (e.g. enabling configuration changes without application restart). Additionally, libelektra offers many features that simplify/enable configuration management: e.g.
libelektra is also available on Windows and macOS (although Windows support is still WIP).
HI @qwepoizt, thanks for working on this. A few quick comments:
Yes, exactly: libelektra synchronizes configuration state (also between applications). This could be misused as IPC for any state but there might be functionality where D-Bus is better suited, especially if it is not about configuration at all.
Is it also appropriate for synchronizing other application state that is not specifically configuration?
It is actually a quite often done, e.g. to store window&panel sizes in configuration files. For such values I would definitely not recommend to store them together with the "normal" configuration settings, but instead using a separate mountpoint in Elektra (i.e. a separate file on the disc).
E.g. if we would store redshift config in /sw/redshift/service/#0/current
(see also https://www.libelektra.org/tutorials/integration-of-your-c-application about how this path is recommended to look like), the redshift UI-specific config could be in /sw/redshift/ui/#0/current
and the more state related config could be in /sw/redshift/state/#0/current
.
Probably it would be a good idea to start with designing how the overall config settings should look like? (Elektra's spec language should be suited to do this. :rocket:) Then we would also see if there are left-overs where D-Bus is much better suited.
..ah sorry, just found in readme there is no way for wayland, comment removed
Thanks to both of you for your remarks!
I believe there's no harm in having redshift communicate with external applications via D-Bus and with redshift-ui via Elektra. The mentioned benefits of using Elektra for configuration instead of D-Bus still remain.
I appreciate @markus2330 's idea of starting with writing an Elektra specification for redshift's config. I'll put that on my agenda.
Hi!
@jonls Could you please create a branch 814-improve-config
in jonls/redshift? I'd then target my PRs to that instead of master. This way, you can later decide if you want to merge improve-config
into master
.
I have some updates I wanted to share:
@markus2330 and I decided that the initial scope was too large for a bachelor's thesis and have narrowed it down accordingly:
I have written up an Elektra specification file for redshift (https://github.com/jonls/redshift/pull/829). CLI arguments are currently missing.
@markus2330 Can you please take a look, if you have any improvement suggestions?
Best regards Tobias
Hi @jonls !
I have finished the specification file and incorporated @markus2330's very helpful review comments.
Feel free to take a look at #829. There is also one open question regarding the gamma
settings where your input would be appreciated.
@qwepoizt :+1: I have created the branch 814-improve-config
Dear redshift community and @jonls!
In the course of my CS bachelor thesis (advised by @markus2330), I am working on several features/improvements for redshift's configuration management. I will document my plan and progress in this issue.
Planned features
These changes will:
Roadmap