Skip to content
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

add XFCE support #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maharvey
Copy link

@maharvey maharvey commented Nov 3, 2023

XFCE does not use gsettings and was always returning 'Light'. Added xfconf-query which is supported by XFCE. (You can set gsettings from the command line to force the GTK theme to update, and then darkdetect works as expected, but that is not the default in the XFCE settings app and most users probably don't do it.)

Added a desktop detection function, and added XFCE support to theme() and listener().

Since 'Light' was confusing when detection fails for non-GTK desktops (internal errors are swallowed), an 'Unknown' theme type is added so that application knows detection was unsuccessful and can choose an appropriate response.

Added a 'watch' option to __main__.py to demonstrate the listener.

This commit also provides a framework to support other desktop environments, like KDE. Those are left as an exercise to someone who knows what to do and is able to test it. The dbus PR looked promising but the dbus method is not working for me (I commented in that PR) and I don't know enough about dbus to debug it, so you still need the gsettings / xfconf-query fallback.

Tested on Manjaro Linux running XFCE 4.18.1

XFCE does not use gsettings and was always returning 'Light'.

Added a desktop detection function, and added XFCE support to theme()
and listener().

Since 'Light' was confusing for non-GTK desktops, an 'Unknown' theme
type is added so that application knows detection was unsuccessful and
can choose an appropriate response.

Added a 'watch' option to __main__ to demonstrate the listener.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant