-
Notifications
You must be signed in to change notification settings - Fork 70
Set a dark theme and background
See the Theme manager Plugin which helps you do this via a nice gui.
Does not work for new Versions (e.g. 0.75.1). See instructions below
The background colour of the main text window is set by the GTK theme.
Everything is easiest with windows Portable edition because all the files are contained in the Zim folder.
You need to know wich gtk version your Zim is using. Newer Versions (e.g. 0.75.1) use GTK3.
- First download a gtk3.0 theme. I will use Orchis-Pink-Dark as an example here (available within the Orchis gtk theme).
- Put extracted theme folder into
...\App\ZimDesktopWiki\share\themes
. - Create the file and directories
...\App\ZimDesktopWiki\etc\gtk-3.0\settings.ini
. - Insert following text in the settings.ini:
[Settings]
gtk-theme-name = Orchis-Pink-Dark
If you have chosen another theme, replace Orchis-Pink-Dark with the name of the extracted folder.
- Restart Zim
First download a suitable dark background (or whatever colour you want) theme. Any GTK 2.x theme should work, I used Nodoka-Midnight. That is a good webiste for getting themes.
Put extract the theme folder into ...\App\ZimDesktopWiki\share\themes
.
Now navigate to ...\App\ZimDesktopWiki\etc\gtk-2.0
and open gtkrc
with notepad or any editor. Edit it so that it contains your theme's name. In my case it was gtk-theme-name = "Nodoka-Midnight
.
Now open Zim and it will be fully themed, almost; you might want to change some of the formatting text colours (see further down this page).
Same as above, but now the gtkrc is in your home folder, not in the zim portable folder.
If installed to C:\Program Files (x86)\Zim Desktop Wiki
, you may have to adjust permissions because Windows tries to protect things under the Program Files directories.
-
Extract the theme to
C:\Program Files (x86)\Zim Desktop Wiki\share\themes
(Give administrative permission) The directory listing should now look like:Default Emacs MS-Windows Nodoka-Midnight Raleigh
- Create the file and directories
C:\Program Files (x86)\ZimDesktopWiki\etc\gtk-3.0\settings.ini
. - Give yourself permission to edit the
settings.ini
file. - Insert following text in the settings.ini:
[Settings]
gtk-theme-name = Orchis-Pink-Dark
If you have chosen another theme, replace Orchis-Pink-Dark with the name of the extracted folder.
- Restart Zim
- Give yourself permission to edit the gtkrc file:
- Right-click
C:\Program Files (x86)\Zim Desktop Wiki\etc\gtk-2.0\gtkrc
and select Properties - Uncheck 'Read-only' if it is checked
- On the security tab, click "Edit...", then click "Add...", type your Windows login name and click "Check Names", then "OK"
- Check "Full control" and okay out of the dialogs
- Right-click
- Edit the gtkrc file to use the name of the directory that you extracted the theme to, ex:
gtk-theme-name = "Nodoka-Midnight"
- Save gtkrc and restart Zim
-
If zim is run from the source code, these files may need to reside in a different location, due to the dependence on the local installation of the PyGTK runtime. On my system, these locations were:
C:\Python\Lib\site-packages\gtk-2.16.6\share\themes C:\Python\Lib\site-packages\gtk-2.16.6\etc\gtk-2.0
-
On another Windows installation, these locations were found in:
C:\Python27-win32\Lib\site-packages\gtk-2.0\runtime\share\themes C:\Python27-win32\Lib\site-packages\gtk-2.0\runtime\etc\gtk-2.0
-
Placing the
Nodoka-Midnight
folder andgtkrc
file in those folders got the dark theme working for me with zim 0.63
To change the formatted text colours you need to edit style.conf, which is located in ...\Data\Config\zim\style.conf
for a portable installation (it might not exist by default, see the zim manual). All the instructions are already in the Zim manual http://zim-wiki.org/manual/Help/Config_Files.html .