Add full support for freedesktop Dark Mode specification#36
Add full support for freedesktop Dark Mode specification#36raghavdhingra24 wants to merge 5 commits intoalbertosottile:masterfrom
Conversation
Added full support for the freedesktop Dark Mode specification(s) using the dbus-send command
|
It is great. Do you plan to add the listener too ? I would love to see this module working with KDE. |
|
Yes, I plan to implement listener as well. Would do this whenever I get some time to work on it. |
Removed some pass statements and added listener support while removing old one as it supports the old method also.
|
Listener support: |
|
dbus is not working on XFCE 4.18.1 on Manjaro. I am getting: theme() is swallowing the dbus error and falling back to gsettings (which works for gnome but not XFCE). |
I have added fallback to gsettings in listener if dbus key is not available and would try to check why it is not working in Manjaro XFCE. |
|
The thing with XFCE is that it uses I made myself a script to keep the XFCE and GTK settings in sync, and that allows darkdetect to work (and also triggers various GTK applications properly). Interestingly they use the same desktop and icon themes. Here is an excerpt from my script showing how they correspond: I created a PR to support xfconf-query, before I saw this PR. If you want to roll the xfconf-query functionality into your PR I'd be happy to cancel mine. (I know I should have checked, but this is my first time trying to contribute to an open source github project and still finding my way around.) It would probably be good to fix xfce-settings-manager too, but I haven't looked into that yet, I was just trying to support dark mode on a python project. |
|
My concern here was that this code was properly working in Fedora 38 (XFCE 4.18) but not in Manjaro XFCE as in your case (Probably Fedora applied some patches). Since this PR is about adding Freedesktop standard support, adding XFCE support using |
|
FWIW, I tried this (https://github.com/albertosottile/darkdetect/pull/36/files as source for creating a patch file) on XFCE-4.20 on Slackware linux (-current, 64 bit) and it works at my end. |
|
I guess this fixed a large part of the issue with XFCE. |
|
Ok,thanks; you're correct; at my end that patch is not needed |
|
This would also be required to work in a Flatpak enviornment |
Hi there,
I have added full support for the freedesktop specifications as suggested by JackobDev in this post https://github.com/albertosottile/darkdetect/pull/34#issuecomment-1359455980 except it uses the
dbus-sendcommand. I have also removed the older version of the code for detecting dark mode using freedesktop specifications as it was interfering with theme detection on some DEs. This code has been tested on the following distros and DEs: