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

color-scheme in wayland gnome doesn't seem to work #72

Closed
txomon opened this issue Jun 6, 2023 · 7 comments
Closed

color-scheme in wayland gnome doesn't seem to work #72

txomon opened this issue Jun 6, 2023 · 7 comments

Comments

@txomon
Copy link

txomon commented Jun 6, 2023

Hello!

I have checked the code in #51 and it doesn't seem like the current gnome implementation is caught by the extension. Just in case, I'm referring to the menu button in the upper corner to switch the theme natively.
image

The current key being monitored is org.freedesktop.appearance:color-scheme, however checking with gsettings, the key in gnome-shell 44.1 it seems to be org.gnome.desktop.interface:color-scheme, with the value default when not in dark mode, and prefer-dark when in dark mode.

The version I'm running is 1.8.1-2023.1.

@weisJ
Copy link
Owner

weisJ commented Jun 6, 2023

The PR doesn’t reflect the current implementation. See the 2023.1 branch for the latest revision used in version 1.8.1-2023.1. It does use the org.gnome.desktop.interface:color-scheme key. But probably the default and prefer-dark versions aren't handled.

Not sure when I’ll find time to tackle this. It should be an easy fix in GtkVariants though. I’d be happy to review and merge a fix for this :)

@txomon
Copy link
Author

txomon commented Jun 6, 2023

I'm afraid I'm missing too much knowledge on Java/Kotlin to be able to test out stuff without actual pairing 😅. I will try to find time in the next couple of weeks and see if I have some luck. One way to maybe lower the bar for contributions could be an standalone cli that works something like:

auto-dark-mode-cli --implementation-type gsettings --guess-light-dark false --change-ide-theme true --ide-theme-light "MyLightTheme" --change-editor-theme true --editor-theme-light "MyEditorLightTheme" --check-high-contrast false

Making this an standalone java cli would make it much easier for me to iterate when testing out by trial and error, as the current setup I achieved forces me to load a whole IDE in debugging mode etc.

@weisJ
Copy link
Owner

weisJ commented Sep 3, 2023

Please try out the new pre-release version of the plugin and see whether it fixes the issue for you:
https://plugins.jetbrains.com/plugin/14076-auto-dark-mode/versions/pre-release/387545

@txomon
Copy link
Author

txomon commented Sep 4, 2023 via email

@tonyabbott
Copy link

Can't speak to Wayland, but this pre-release has fixed the Xdg-Desktop implementation for me on Ubuntu 22.04.3 Gnome / XOrg, which hasn't been working for some time. My IDEs now correctly track the system light/dark mode where they were previously just stuck in dark mode.

@txomon
Copy link
Author

txomon commented Sep 4, 2023

@tonyabbott are you able to test out the situation I shared? Choose the xdg-desktop settings in the old one, click OK, restart the IDE, and see if it works?

Cheers, Javier

@Lesik
Copy link

Lesik commented Sep 21, 2023

Switching to the "xdg-desktop" method works for me on GNOME 43. By the way, I don't think this is a Wayland vs. X11 issue but rather dependent on the GNOME version. In a future version, perhaps this plugin could auto-detect which method to use based on some heuristics like GNOME/GTK version. Keeping the switch in the settings is fine for edge cases, but it would provide for a better OOTB experience.

Thanks for this plugin @weisJ by the way. A lifeeyesaver.

weisJ added a commit that referenced this issue Dec 17, 2023
weisJ added a commit that referenced this issue Dec 17, 2023
weisJ added a commit that referenced this issue Dec 17, 2023
weisJ added a commit that referenced this issue Dec 17, 2023
weisJ added a commit that referenced this issue Jan 19, 2024
Relates to #72

(cherry picked from commit 3182705)
@weisJ weisJ closed this as completed Mar 16, 2024
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

No branches or pull requests

4 participants