How to install a dark theme for zim desktop wiki

5,254

Solution 1

I use Zim quite a bit, but there are a few other apps that caused me to change all my GTK apps to a dark theme, using the Gnome Tweaks application.

To try this method, first install the Gnome Tweaks tool:

sudo apt install gnome-tweak-tool

Then, hit the Super key or click the "Show Applications" button on the bottom left of the desktop, and type "tweaks".

After tweaks comes up, select the "Appearance" tab. You'll notice that the first section is "themes". For Zim, the "Applications" setting is the one controlling the theme.

On 18.10, I was able to select Adwaita-dark, and Zim picked up the settings immediately.

There's a relevant makeuseof.com article with a lot more information on how to change the gtk theme, if you need it.

This is a quick and easy change, so you can change back if the aesthetic doesn't please you.

Solution 2

I am using XFCE with the Adwaita Dark style, but this should work for Gnome, too. The overall GTK style should already make Zim take on a "dark" style, just like any other application. However, there are a few things that do not work well, e.g. highlighted text will be white on yellow, and the colors used for code and links are too dark for a dark background.

But those things (and more) can easily be changed in Zim's own style configuration, in ~/.config/zim/style.conf. You have to restart Zim for the changes to take effect, so finding the right values can be a bit tricky. For me, I changed the following bits:

[Tag mark]
background=lightyellow
foreground=black

[Tag code]
foreground=lightgray

[Tag pre]
foreground=lightgray

[Tag link]
foreground=lightblue

Solution 3

It's been almost 3 years... But I like to add how I handle this situation as it might be helpful to someone else.


Take note that it's 2021 now, this solution might not work on Ubuntu 18.04!


I'm on OpenBox, as I basically like to use dark themes in general, what I did was adding this line:

gtk-application-prefer-dark-theme=1

to this file:

~/.config/gtk-3.0/settings.ini

Now Zim and all my other apps are using the dark version of my theme.

At the same time there are applications that I don't want them to use the dark version of the theme. One is Libreoffice. So I use GTK_THEME environment variable to make it use a light theme.

$ cp /usr/share/applications/libreoffice-startcenter.desktop \
.local/share/applications/

Then change this line:

Exec=libreoffice %U                                             

To this one:

Exec=env GTK_THEME={THEME-NAME}:light libreoffice %U                       

Obviously, You can reverse the solution, passing GTK_THEME={THEME-NAME}:dark to Zim and use the light version of theme for all the other apps.

Share:
5,254

Related videos on Youtube

Shihab Khan
Author by

Shihab Khan

Updated on September 18, 2022

Comments

  • Shihab Khan
    Shihab Khan over 1 year

    I am using Zim desktop wiki for note taking on Ubuntu. I was trying to set up a dark theme for Zim. I couldn't get any information on it on the internet.

    There is a Windows-specific page available on the internet which talks about setting up a dark theme, but there's no solution for Linux systems.

    Is it possible to get a similar dark theme set up on Zim wiki on Ubuntu 18.04.1?

  • belacqua
    belacqua over 5 years
    @ShihabKhan That's great. As I'm OK with a universal dark theme, I haven't tried application-specific methods, like those mentioned here (which are more fiddly but still workable): unix.stackexchange.com/questions/14129/…