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?
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: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.
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:
to this file:
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.Then change this line:
To this one:
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.