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

allow simple choice for dark/light systray icon instead of blinding y… #109

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

Conversation

GloriousEggroll
Copy link
Contributor

…ellow

dark
light

@timlau
Copy link
Owner

timlau commented Nov 7, 2024

Most of it is fine, except from having the selection for changing the dark/light icon on the menu.
This should be done in yumex preferences UI or even better detected by the system dark/light mode setting.

@GloriousEggroll
Copy link
Contributor Author

GloriousEggroll commented Nov 7, 2024

I found having it in the menu was way easier because I don't have to wait for the application to load to change it. Also I don't know how to detect dark/light mode and that also doesn't work well for custom themes. It also doesn't work well for non-standard DEs beyond gnome/kde.

@timlau
Copy link
Owner

timlau commented Nov 8, 2024

The best way to detect it is properly to use XDG Desktop Portal, most DE has implemented it

https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.impl.portal.Settings.html

from dasbus.connection import SessionMessageBus
from dasbus.typing import get_native

bus = SessionMessageBus()

proxy = bus.get_proxy(
    "org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop", "org.freedesktop.portal.Settings"
)

res = proxy.Read("org.freedesktop.appearance", "color-scheme")
print(get_native(res))

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.

2 participants