Is there a way to trigger the dark mode from command line/shell?
-
Since KDE does not have a real dark mode switch yet, I am writing a script to do this for all applications. The only thing missing is Vivaldi. Is there a command with which I can switch to dark mode immediately?
-
AFAIK, no. Vivaldi doesn’t even respect the Gtk dark mode switch.
-
@jan292
Hi, may be I miss understand but you can enable dark mode with vivaldi://flags
#enable-force-dark
There are 6 different modes to use dark mode.Cheers, mib
-
Where is the section where you can bash the developers then? I want at least a command
-
@mib2berlin No I need a command that I can excecute from the Linux terminal. Something like
vivaldi-stable --change-theme dark`
but there are absolutely no flags to run Vivaldi with. I would also be satisfied if someone could show me the relevant part in the settings file.
-
Not that I know of, but the menus can follow the dark theme in KDE. As long as you have configured the GTK Application Style in KDE and set it to something dark, then in
chrome://settings/?search=gtk
switch to GTK+. -
@jan292 Have you tried
--force-dark-mode
?https://peter.sh/experiments/chromium-command-line-switches/#force-dark-mode
Not sure its relation to the flag
#enable-force-dark
, should be the same but depends on whether its set permanent or not I guess? -
If you really want it, you can also code it yourself (if you can code); I tried (& failed) to do it earlier. But scheduled themes may be enough to change the Vivaldi theme.
The base structure would be:
- the command you execute (automatically on KDE theme switch): connects to the IPC pipe. If no pipe is found, changes a file.
- pipe: is the server of the IPC pipe, is run by Vivaldi.
- on startup checks the file for changes
- when it receives a message through the IPC pipe, sends it to Vivaldi
- an extension: yet another code-in-the-middle. Exists because Vivaldi doesn’t have NM permission. Runs the pipe. When it receives a message, it forwards it to Vivaldi.
- a mod: handles the messages from the extension, changes the theme.
Still, you cannot change
prefers-color-scheme: dark
on the fly, and you have to change the flag or command line options to alter it between two sessions. -
@Pathduck Tried that earlier and it did not work
@potmeklecbohdan Thanks but that seems overly complicated. The developers should just provide a few commands. I mean EVERY application can be used via command line in Linux. Not Vivaldi though...
-
I remember darkly that somebody already tried to do something similar, but can’t find the topic right now.
-
@jan292 The command is working but can't be applied anew to an existing profile afaik/iirc, only to a new one, which I suppose isn't much of a help in what you are trying to do.
vivaldi-stable --force-dark-mode --user-data-dir=/tmp/vivaldi-test-profile
/edit: well screw the above sentence (the command below always works though)... I've played around a bit now and sometimes it does apply, sometimes not, depending on what "family" theme it was set before the command, if you 'd set a new theme when it was launched with the switch and re-launched and whatnot. Bah, good luck, I'm outta here
-
@luetage said in Is there a way to trigger the dark mode from command line/shell?:
I remember darkly
Boom tish
-
@guigirl Thank you for noticing. I’ve been sad for two years because everyone ignored my witty comment, now I got some closure.
-
Ppafflick moved this topic from Vivaldi for Linux on