Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

so you're saying to get gtk apps to switch to dark mode, you'd find the gtk setting for dark mode? and the same for qt?


Yes, for example check "gsettings set org.gnome.desktop.interface gtk-theme" for the gtk apps.


As in this post

https://askubuntu.com/questions/769417/how-to-change-global-...

I ran gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark' and firefox isn't in dark mode, despite the fact that i have firefox configured to use the system theme and firefox is on GTK according to google.

Help again?


When you set dark mode in the current gnome (with support for dark mode), the following will be set:

    org.gnome.desktop.interface color-scheme 'prefer-dark'
Valid values are “default”, “prefer-dark”, “prefer-light”.

    org.gnome.desktop.interface gtk-theme '(your-theme)-dark'
This is the one you have set.


    $ gsettings get org.gnome.desktop.interface color-scheme
    No such key “color-scheme”

Debian 11. Is it because it's old-ish?


Oh, Gnome 3.38. I'm not sure that version even supported dark mode, only dark themes. I won't comment on aging of Debian ;).

Btw, what version of Firefox are you using? Debian comes with ESR, so chances are, that firefox' "ui.systemUsesDarkTheme = 1" still works (it doesn't in newer releases).


I have 102.6.0esr (came with the OS) and I also installed 126.0. Neither of them has has `ui.systemUsesDarkTheme`.

So anyway do you think that if I upgrade to the latest Debian, your gtk command line will work?


It should; it does on the gnome install: https://youtu.be/Vpkz89gN9zk


Oh man that's such a nice feature.

I guess now I have a reason to upgrade.

Thank you!


See but this is the kind of responses that confuse me.

What does that mean "gtk apps"? Is firefox a "gtk app"? Is vscode a "gtk app"? etc.


Check the dependencies. If it depends on libgtk, it's a gtk app. libQt, is a qt app. There maybe rare other situations (Tk, plain xlib, fltk, etc.)


This will get you 99%, but there are exceptions. I.e. Firefox is linked against GTK, but paints its own widgets with custom theming anyways. Telegram is linked against Qt, but has it's own theming/dark mode too.


You seem like you know what you're talking about, help please? https://news.ycombinator.com/item?id=40583867




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: