Dark theme also for applications that are not GTK3

12 respostas [Última entrada]
Sven
Desconectado
Joined: 07/30/2017

Hi everyone,

I'm using Trisquel and have changed to a dark theme using the Tweak Tool in System Settings. However, as I understand that only works for GTK3 applications. I have noticed that it does not work for applications such as Abrowser and KRDC.

Firefox is apparently a GTK2 application. There is an instruction on https://askubuntu.com/questions/337018/firefox-not-affected-by-gtk-theme#337021 regarding theme for Firefox on Ubuntu. Does anyone know if this is applicable to Abrowser on Trisquel or if there is a better way? If possible, I would like also the Abrowser menu to be dark, and that does not seem to be changed by Themes under Customize in Abrowser.

I also use KRDC, which is a KDE application (because Remote Desktop Viewer and Remmina didn't work well for me with RDP). Therefore I'm also interested if there is a way to apply dark theme on KDE applications in Trisquel?

Sven
Desconectado
Joined: 07/30/2017

Now I found a solution for Abrowser: There is a Firefox theme called FT DeepDark, which works great, also for making the Abrowser menu dark. Don't know if GTK version was really the cause of the original issue I had with Abrowser (after I had changed some setting in Trisquel, perhaps when I tried High Contrast under Universal Access, some text e.g. in Abrowser's menu turned white and was difficult to read on light grey background).

(Changing the gtk-color-scheme in gtkrc, as described in the comment by mason81 on the link I provided before, did change the appearance of the window title bar etc, but that was not what I was looking for so I restored the original gtkrc.)

If anyone has a suggestion how to apply a dark theme on KDE applications in Trisquel, that would still be interesting.

Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010

I use the "Compact Dark" theme of Firefox/Abrowser. It has come by default (disabled) since version 53. It can be enabled through the "Appearance" tab of the "Add-ons" (that you can access from the menu button or typing "about:addons" in the address bar).

Sven
Desconectado
Joined: 07/30/2017

Hope GNU IceCat will in the future come with a dark theme, which can be enabled that easily.

Sven
Desconectado
Joined: 07/30/2017

Thanks for the comment. First, I didn't think there was a Firefox/Abrowser theme that could make the browser menu and web page background dark. I had tried different themes, including Compact Dark.

This is a summary of what has worked best for me, in order to get a good readability with dark background:

System Settings -> Tweak Tool -> Appearance
Global Dark Theme: ON
Theme
Window: Adwaita (default)
GTK+: Adwaita (default)
Icons: Trisquel
Cursor: Adwaita (default)

Abrowser
FT DeepDark

Have also seen that there are separate dark themes for Gimp, but have not yet found one I'm satisfied with.

Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010

To affect the Web pages the browser displays, you can install the Stylish add-on: https://trisquel.info/en/browser/addons/stylish

There are global dark themes. I use https://userstyles.org/styles/112107/global-black-for-amoled-displays

Some sites raise troubles though. In particular, with the style above, you cannot read Wikipedia's math formulas. You can disable the theme in two clicks (through Stylish's icon on the menu bar) though. In fact, I installed another Stylish theme to still get a dark background on Wikipedia after disabling the theme above: https://userstyles.org/styles/126990/wikipedia-minimalistic-pure-black-red

Pay attention to the licenses of the styles you install from https://userstyles.org because some are non-free!

Sven
Desconectado
Joined: 07/30/2017

I tried installing Stylish in GNU IceCat and that seems to work well, but have not yet found a way to install a Stylish global dark theme. It is unfortunately not possible for me to see the page content of https://userstyles.org on IceCat. Perhaps a workaround is to "Install from URLs..." (under IceCat's menu -> Add-ons -> User Styles), but I don't seem to have found the correct URL.

Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010

GNU LibreJS (enabled by default in IceCat) blocks the execution of all scripts on https://userstyles.org ... rightfully I think (the executed JavaScript was minimized with no apparent way to read the source code). :-(

Here are links to directly install the two themes I was talking about:

Two let you some choice, here are two other themes (again, the first one is global, the second one is for Wikipedia after disabling the global theme) for you to test:

Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010

I have just discovered a brand new global style that does not need to be disabled to see Wikipedia's formulas! From Stylish's tab in the add-ons, you can "Install from URLs..." https://raw.githubusercontent.com/danielsonnier/TotalBlackTheme/master/TotalBlack.css

Sven
Desconectado
Joined: 07/30/2017

Works great! Thank you once again.

Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010

FT DeepDark is non-free: https://addons.mozilla.org/en-US/firefox/addon/ft-deepdark/eula/

For the chrome (i.e., the browser's window except the page it displays), "Compact Dark" looks similar (a little blueish though). See my post above for example free software themes (using the Stylish extension) for the displayed pages: these are life-changers! :-)

I love black backgrounds. I find them far more relaxing. I basically spend most of my computing time looking at black backgrounds: "my" wallpaper (attached) is black, I use Ctrl+I to inverse colors in Evince (GNOME's document viewer), "my" terminal is dark gray on black (I think it is Trisquel's default, isn't it?), so is "my" Scilab (tuned from the "Colors" tab of the "Preferences" in the "Edit" menu, as for the GNOME Terminal) and so is "my" Emacs (where I spend most of my time) thanks to this code in ~/.emacs:
(defun set-dark-colors (&optional frame)
"Set colors suitable for working in the darkness without electricity."
(interactive)
(if frame
(select-frame frame)
(setq frame (selected-frame)))
(set-background-color "black")
(set-foreground-color "DarkGrey")
(set-cursor-color "red")
(when (facep 'region)
(set-face-background 'region "DimGray" frame))
(when (facep 'fringe)
(set-face-background 'fringe (face-background 'default) frame)
(set-face-foreground 'fringe (face-foreground 'default) frame)))
(set-dark-colors ())

free_as_in_freedom.png
GNUbahn
Desconectado
Joined: 02/18/2016

That's a nice background!

You say that "For the chrome (i.e., the browser's window except the page it displays)". I would be surprised if you use the chrome browser, and I have never heard "chrome" used in the meaning your parenthesised explanation indicates. So I am puzzled. Will you enlighten me?

Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010