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

[Feature Request]: Linux: theme: auto switch #181

Open
yuioto opened this issue Jul 30, 2023 Discussed in #177 · 1 comment
Open

[Feature Request]: Linux: theme: auto switch #181

yuioto opened this issue Jul 30, 2023 Discussed in #177 · 1 comment

Comments

@yuioto
Copy link

yuioto commented Jul 30, 2023

Discussed in #177

Originally posted by yuioto July 27, 2023

wiliwili 的自动暗黑模式不在Linux工作

原讨论大致为wiliwili不支持在Linux下识别主题。只能通过启动时读取环境变量或配置文件overwrite。

@yuioto
Copy link
Author

yuioto commented Jul 30, 2023

Support org.freedesktop.appearance.color-scheme to retreive system dark mode

There is now a desktop environment independent way to query the system dark mode: The org.freedesktop.appearance.color-scheme key in the XDG desktop portal.

It's also possible to be notified during runtime as soon as the dark mode preference changes.

Example desktop environments that have support for this key are:

  • KDE Plasma
  • Gnome
  • And others WMs if org.freedesktop.appearance.color-scheme supposed.

More info

Example apps and implementations that already support this key

On Linux shell get dbus message

gdbus call --session --timeout=1000 \ 
--dest=org.freedesktop.portal.Desktop \ 
--object-path /org/freedesktop/portal/desktop \ 
--method org.freedesktop.portal.Settings.Read org.freedesktop.appearance color-scheme

Copy from:
https://unix.stackexchange.com/questions/701432/command-for-detecting-whether-the-system-is-using-a-dark-or-light-desktop-theme

archlinux-github pushed a commit to archlinux/aur that referenced this issue Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants