Vivaldi does not detect system's dark theme on Linux (Ubuntu)
-
There are websites that have dark variations of their themes which are only shown if the entire OS is in dark mode. If I open such pages from Firefox for example it detect that my OS is in dark mode and the site loads the theme accordingly. But this in Vivaldi doesn't function
-
@sofroniecristian Is there an option in vivaldi:flags to do this?
-
@sofroniecristian chrome://flags/#form-controls-dark-mode
-
I didn't find any and the one you give doesn't seem to work. I tried it on the Neovim page
-
Yeah, this doesn’t work on Linux yet, I think it’s because of Chromium (and because the only ‘easy’ (i.e. w/o having to detect it yourself from the theme’s code), near-to-standard-but-not-yet-there toggle in the UNIX/Linux world (in Gtk) seems to be being abandoned? but then anyway, FF can do it)
-
Stupid temporary solution:
Ctrl-Shift-I
;Ctrl-Shift-P
;emulate dark
;Enter
and keep DevTools in background -
Vivaldi + GTK dark theme is not supported yet. The issue was reported last year.
-
If I pass --force-dark-mode from the command line it works. But it seems that command line flags and experimental feature flags from vivaldi://flags are not the same thing? Does anyone know where could I put this flag in a file in order to have it used all the time?
-
It seems that after following simlinks I get to /opt/vivaldi which is a bash script. If I pass --force-dark-mode inside the script then it works. Like this:
exec -a "$0" "$HERE/vivaldi-bin" --force-dark-mode "$@"
-
Also there is this: https://wiki.archlinux.org/title/chromium#Dark_mode. Not sure yet if it works for Vivaldi
-
@sofroniecristian Do not modify V’s original files, they’ll get overwritten. If you use a usual launcher (like in DEs etc), copy its
.desktop
file to~/.local/share/applications
and modify that copy. If you callvivaldi
directly (e.g. via dmenu or a shortcut), create a script somewhere with high priority in your$PATH
and call/opt/vivaldi/vivaldi
(you gotta use the absolute path because justvivaldi
now refers to your script) with your custom args there.AFAICT the
chromium-flags.conf
way doesn’t work. -
@potmeklecbohdan If you are on Arch Linux / Pacman, you could do this: https://wiki.archlinux.org/title/Vivaldi#Making_flags_persistent (specific only for Arch package)
-
Any update on this?
-
@BrowserMatt2023 Not tested yet, but perhaps new feature in 6.6.3222.3 Snapshot works.
-
@DoctorG This is interesting. Thanks for the reply. I'm sure this feature is referring to The prefers-color-scheme CSS media feature that some sites use. The thing is, sites that use that (like GitHub and MDN Web Docs for instance.. see screenshots below) already work based on my OS color scheme within vivaldi, so this feature doesn't do much except allow me to override that, which I'm not sure is necessary. It also begs the question, if the browser can detect the OS preference via CSS why can't vivaldi properly detect it on Linux and dynamically update it's own theme? Almost every other app/browser I use is able to.
OS Dark:
OS Light:
-
@BrowserMatt2023 CSS prefers-color-scheme work for me on Debian 12 and Ubuntu 22/23.
Flag force-dark-mode is not a solution and does not show real color scheme of a website.
But Vivaldi does not switch to its own UI's dark theme, that is a known bug.
-
Is this issue only for linux? Since I have the same on macOS.
-
@Veddu Switching to Vivaldi's dark theme as defined in settings when OS is dark mode is broken on Mac and Linux.
-
Google Chrome already does this well in Linux. Since Vivaldi is Chromium, I wonder why this does not work.
-
@majalmirasol Chrome 126.0.6478.55 does only detect dark mode of UI when Settings → Appearance → Design is set to GTK.
The Vivaldi UI theme is not switched to dark, only the internal Chromium core pages and context menu. Same need of setting GTK.