albertosottile / darkdetect

Detect OS Dark Mode from Python
Other
171 stars 18 forks source link

Update _linux_detect.py to add initial support for freedesktop standard on gnome #22

Closed raghavdhingra24 closed 1 year ago

raghavdhingra24 commented 2 years ago

The original code only used the names of gtk-themes for checking of dark mode. Now, I have added support for the new freedesktop standard for checking dark mode in gnome as newer versions of gnome use this for setting dark mode.

Currently had not updated the code for the listener.

albertosottile commented 1 year ago

I apologize, I was on vacation in the end of May and I missed this entirely. Does the command with color-scheme trigger an error when called on unsupported systems?

raghavdhingra24 commented 1 year ago

No problem, I have tried it on Gnome 40 (it has no support for the freedesktop standard) it had successfully reverted to gtk-theme for getting the current theme of the system.

albertosottile commented 1 year ago

Thanks again for this PR, I apologize if it took me so long for merging it. You will find this feature in the next release.

raghavdhingra24 commented 1 year ago

Thank you for merging this PR, additionally I would keep an eye if this creates any issues with the detection of dark mode.