Open motorto opened 12 months ago
Do you have your KeePassXC theme set to automatic?
Dark theme is determined here:
Yes.
On 23/10/02 04:53PM, Jonathan White wrote:
Do you have your KeePassXC theme set to automatic?
-- Reply to this email directly or view it on GitHub: https://github.com/keepassxreboot/keepassxc/issues/9892#issuecomment-1743934470 You are receiving this because you authored the thread.
Message ID: @.***>
For the most part, this is Gnome being buggy, see #7817. We don't explicitly listen to org.gnome.desktop.interface color-scheme
, but to the freedesktop signals. If Gnome doesn't send them anymore, we may need to add them as well.
I have the xdg-desktop-portal-gtk + xdg-desktop-portal-wlr both installed (and running) but when executing the query in https://github.com/keepassxreboot/keepassxc/issues/7817#issuecomment-1092210362, I don't have an expected output instead:
$ qdbus org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings.Read "org.freedesktop.appearance" "color-scheme"
Cannot find 'org.freedesktop.portal.Settings.Read' in object /org/freedesktop/portal/desktop at org.freedesktop.portal.Desktop
Probably some missing functionality on the portals ?
Just to add installing the flatpak version the dark/light detection works properly !
Likely flatpak portal doing a translation for us between gnome and freedesktop standards
Just as a note, with both Fedora 38, and Fedora 39 + Gnome 45, I note that when KeepassXC starts with the system, it always selects the light theme.
If you close and open KeepassXC again, the correct theme is selected.
If you turn off Dark Mode, then turn it on again, the correct theme is applied to KeepassXC.
I live in Dark Mode however, so I manually changed the theme within KeepassXC to Dark.
That would indicate that keepassxc is starting too soon, or we are not dynamically registering the theme detection through dbus.
For what its worth, this is what it looks like set to Dark theme, and auto-started with login:
After exiting and loading KeepassXC again, it looks like this:
Note that both the theme, and the min / max buttons in the titlebar are wrong.
Title bar color and min max styling are not controlled by KeePassXC. Those are set by the window styling of the compositor. I think you need to add a delay to starting KeePassXC to resolve this.
I'm using darkman
on sway
to expose the value via org.freedesktop.portal.Settings
and can confirm that it works fine.
Using gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
will only affect some GNOME applications (I have an impression that this is deprecated anyway). I believe you need xdg-desktop-portal-gnome
for the setting to translate into a portal setting.
I'm using
darkman
onsway
to expose the value viaorg.freedesktop.portal.Settings
and can confirm that it works fine.Using
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
will only affect some GNOME applications (I have an impression that this is deprecated anyway). I believe you needxdg-desktop-portal-gnome
for the setting to translate into a portal setting.
I am using darkman also (Thanks for developing it). And yes I don't have the xdg-desktop-port-gnome
installed,
I only have:
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
Going to give it a try ! (but shouldn't the gtk portal be agnostic and the gnome only used when using the gnome desktop env ???)
xdg-desktop-port-gnome
is gnome-specific. You're using a gnome-specific setting (org.gnome.desktop.interface color-scheme
) and want it exposed via the portal interface, then you need the gnome-specific portal impl.
FWIW: darkman also exposes a portal interface. Maybe you're missing a portals.conf
for it to be used? The gnome one also won't be used without a portals.conf
file.
Assuming I understood correctly what you meant I don't need to install the xdg-desktop-gnome if the darkman is configured properly right ? (btw, I am the packager/maintainer of darkman for void)
The content of my /usr/share/xdg-desktop-portal/portals.conf
is the following:
[preferred]
default=*
I also have the darkman portal at /usr/share/xdg-desktop-portal/portals/darkman.portal
[portal]
DBusName=org.freedesktop.impl.portal.desktop.darkman
Interfaces=org.freedesktop.impl.portal.Settings
UseIn=sway
I'm not sure if it is relevant but I just set the environment variable NIXOS_OZONE_WL=1
to make Chrome start with OZone=Wayland
and KeePassXC started with light theme this time even though it always used dark theme before.
I hat to set the Dark theme explicitely in the KeePassXC settings to get it back.
Overview
The system theme is not respected.
Steps to Reproduce
Actual Behavior
The light theme is always selected.
Context
If I run
When opening keepassxc the dark theme should be selected.
debug info
Operating System: Linux Desktop Env: sway Windowing System: Wayland
Open to send more information. And maybe an explanation on how the detection of system theme is done, could help me figuring whats wrong (with my setup, probably)