Closed frewsxcv closed 2 months ago
I'm on it!
Some relevant macOS links:
I have a working function that takes a callback.
I'm calling dark-light::detect
on a loop and invoking the callback function when the theme changes.
I want to leave this behavior for distros that haven't yet implemented color-scheme
since there's no single way we can get every DE to notify us of a change in theme. Let me know if there's a better way to do this.
For the ones that have, I would like to get a notification from dbus
when that key changes value, can dbus
do that?
Yes you can get a notification from dbus. That would be better than a perpetual loop.
Any ideas for distros that haven't implemented color-scheme
? I really don't like that loop 😅
For the ones that rely on config files, you could use https://lib.rs/crates/notify
I considered using that crate, I'll see what I can do. 😉
Yes you can get a notification from dbus. That would be better than a perpetual loop.
I have little experience working with dbus, could you point me in the right direction?
I don't have much experience with dbus either, but I do know it can emit signals that your application can receive. This looks like the signal we want.
Big help! Thanks 🙏🏼
See this repo where I implemented listening color scheme preferences from freedesktops dbus: https://github.com/d2weber/tintanum