56 lines
1.7 KiB
Markdown
56 lines
1.7 KiB
Markdown
# Browser Dark Mode
|
|
|
|
Dark Mode luckily has become a thing also in the non-unix world. Finally
|
|
browsers can be used with dark interfaces and websites can have
|
|
alternative color schemes.
|
|
|
|
However, in other operating systems, there is a global toggle for dark
|
|
mode, which also switches the browser into it. This is not the case on
|
|
linux and unix systems.
|
|
|
|
## Chrome / Chromium / Iridium
|
|
|
|
Chrome and Chromium starting with version 73 can be tought to start in
|
|
dark mode:
|
|
|
|
<pre>
|
|
$ chrome --enable-features=WebUIDarkMode --force-dark-mode
|
|
</pre>
|
|
|
|
Then go to chrome://settings/?search=themes and switch the theme to
|
|
"Classic".
|
|
|
|
## Firefox
|
|
|
|
Firefox learned the dark mode in release 70.
|
|
|
|
0. Go to "about:config"
|
|
1. Enter "ui.systemUsesDarkTheme" into the search bar
|
|
2. Click "Number" and then "+"
|
|
3. Enter "1" and click the check mark
|
|
|
|
Right click on a free spot in the icon bar and select "customize". At
|
|
the bottom left of the screen, you can switch to a dark theme.
|
|
|
|
Note: If you've set privacy.resistFingerprinting to "true" the CSS dark
|
|
mode switching won't work. Kudus to
|
|
[@andinus@tilde.zone](https://tilde.zone/@andinus) for figuring this out.
|
|
|
|
There you go, both browsers are in dark mode now. The UI should be dark
|
|
and also websites that support the `@media (prefers-color-scheme: dark)`
|
|
directive should make use of it.
|
|
|
|
You can test it on my webpage ([https://codevoid.de](https://codevoid.de)). The
|
|
light version has a light gray background and a blue font. The dark version has
|
|
a dark gray background and an orange font.
|
|
|
|
## vim-browser (vimb)
|
|
|
|
<pre>
|
|
$ echo "set dark-mode=true" >> ${HOME}/.config/vimb/config
|
|
</pre>
|
|
|
|
## luakit
|
|
|
|
Open `:settings` and check `application.prefer_dark_mode`
|