-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support for Linux #50
Comments
I know supporting more desktop environemnts than just Gnome would be very desirable, but sadly I simply do not have the capacity to implement such features at the moment (In particular mantaining the implementation). It looks like it could be a rather simple implementation that follows a mix of the macOS/Windows and Gnome implementation. |
Would this also entail Gnome i.e. could this replace the current implementation for it? |
I would love to do that, but I need a starting point: where is the current implementation for Gnome, what do I need to change etc
Yes, Gnome has implemented it |
The Gnome implementation is located at: https://github.com/weisJ/auto-dark-mode/tree/master/linux/gnome For a starting point you can simply follow the layout of the
To integrate the native code you can follow the implementation of https://github.com/weisJ/auto-dark-mode/blob/master/linux/gnome/src/main/java/com/github/weisj/darkmode/platform/linux/gnome/GnomeLibrary.java and The main work then is to implement I hope this helps to get started. If you have any more questions feel free to ask. |
auto-dark-mode-plugin-1.8.0-2023.1.zip I have prepared a preliminary build incorporating the new Xdg based mechanism. Please check for any issues :) |
Just tested on arch with KDE Plasma, works great! Thank you so much! |
Yes, XDG mechanism also works on Gnome 44, tyvm! Plugin could ask for a Restart after this settings change, because automatic changes wouldn't trigger before I manually restarted IDE. |
The final version will not need a restart ;) |
There is now a way to detect the active theme variant on many Linux desktops. It's a xdg-desktop key that can be accessed via dbus: flatpak/xdg-desktop-portal#633 (also works outside of Flatpaks)
Service:
org.freedesktop.portal.Desktop
Method:
/org/freedesktop/portal/desktop org.freedesktop.Settings.Read
Namespace:
org.freedesktop.appearance
Key:
color-scheme
It returns a
uint32
:1
for dark mode and2
for light modeIt is not implemented everywhere yet (as far as I can tell), so errors would need to be catched.
The text was updated successfully, but these errors were encountered: