Linux Mint 18 - Editing Themes

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon
Post Reply
lentro
Level 1
Level 1
Posts: 2
Joined: Tue Jun 14, 2016 11:07 am

Linux Mint 18 - Editing Themes

Post by lentro » Tue Jun 14, 2016 11:37 am

Hello there,

i'm completely new to the Linux world, but i want to try to use it as main OS for my Computer instead of Windows.

I would describe myself as Power User, so already in Windows i tried to configure the OS to my likings. But i'm very used and prefer it to use tools and programs for this purpose. So i don't want to do too much with command lines if possible.

Now to the topic, i want to edit the Cinnamon themes i use in Linux Mint 18 Beta. It's only about changing colours for now. So for this purpose i tried a few tools and read how to use them in internet but it seems they all don't work. I installed: dconf and GNOME Color Chooser. Basically in Linux Mint the main color is green. I want to use a different colour. The themes you can choose in the official Theme settings offer different colours. But if you use them, then, it's not all changed. It's always only some parts of it. For example when you draw with your mouse an area, the marked area is always green. The same it is for highlighted tasks in the taskbar.

What i also did try is to go into the gtk.css and the cinnamon.css files of those themes. There are a lot of Hex Codes for colours but i don't know which ones to change. As said i would prefer tools. Is it because of Linux Mint 18 BETA they aren't working? So better use Linux Min 17 versions? Or do they need to be started with admin rights. I just started them the usual way.


Thanks for your help!

lentro
Level 1
Level 1
Posts: 2
Joined: Tue Jun 14, 2016 11:07 am

Re: Linux Mint 18 - Editing Themes

Post by lentro » Wed Jun 15, 2016 11:33 am

Here you can see the two mentioned examples which are in green:

http://oi66.tinypic.com/160zm2s.jpg

Penn
Level 5
Level 5
Posts: 753
Joined: Tue Jun 10, 2014 1:12 pm

Re: Linux Mint 18 - Editing Themes

Post by Penn » Fri Jun 17, 2016 11:32 pm

I'm not sure but I think that tool only changes colors for GTK2. I also haven't had any time to take 18 for a full test drive (especially since I am decently satisfied with LMDE) but what I will say should translate to 18.

First, if you mean what I think for "draw an area" that would be the the selected background color (more precisely theme_selected_bg_color in Mint-X). In the Mint-X I use it is in /gtk-3.0/gtk-main.css but I suppose it is possible it has changed in the newer version to just gtk.css . One of the things I don't know if how much, if any, is adjusted in the gtk-2.0 folder in the gtkrc file but at least in 17 there are quite a few apps that still use 2.0 (most of the pre-installed apps that fit this have been changed to x-apps but I am sure sooner or later you will come across a program that still uses 2.0 so you might as well change the selected color there too.

That green on the taskbar green will be probably be somewhere in the "window-list" section of cinnamon.css . If it helps to know, the window list is the name for all the entries that indicate open windows. I don't have time right now to explore for the exact line but if you think you found a line that might do the trick (will probably have the word active in it) change it but be prepared to change it back if you are wrong, you can't hurt much just changing colors (even so I usually test one at a time).

To see if any changes have the desired effect switch away from the theme if you are using it, then switch back (desktop under theme selection is the taskbar and controls would probably do what you want on the other issues you asked about). Occasionally you have to restart cinnamon to get the changes to take effect which is easiest to do by logging out the back in (another way is ctr+alt+esc but that can sometimes cause issues elsewhere).

Always create a backup before adjusting a theme and if you think you are going to change a theme significantly enough, just make a copy of the theme folder you want to change and rename it to a new name of your choice.


edit to add - Some of the green colors are actually icons found in a few places throughout the theme folder so you would need to change those with gimp or inskape depending on if they are .svg or .png

ccprog
Level 1
Level 1
Posts: 12
Joined: Sun May 17, 2015 6:04 pm

Re: Linux Mint 18 - Editing Themes

Post by ccprog » Mon Jun 20, 2016 9:49 pm

For the new Mint-Y theme, you could download from https://github.com/linuxmint/mint-y-theme, which has scripts and instructions for compiling the theme. Basically, there are some _colors.scss files where you find the central color definitions.

You might need to install some extra tools/programs to use the scripts:
  • optipng
  • ruby-sass
  • inkscape
Mind that a lot of colors are hidden inside the various .svg files scattered around the theme. But in the end, you will find that the mint green comes only in two variants: #9ab87c and #8fa876. (My tip for an aqua blue: #6fb4d6 and #6da5c2) You can easily search-and-replace them with a text editor (or you open them in Inkscape and work your way through grafically.)

After everything is compiled, copy the files from Mint-Y/usr/share/themes to your ~/.themes folder and rename them Mint-Y-<Color>[-Dark, -Darker].

For icons, things need to be a bit more improvised. If you would like to use one of the color variants from the Mnt-X-<Color> icons, this should help:

Find the ~/.icons folder in your home folder. With root rights, copy the folder /usr/share/icons/Mint-Y there and rename it Mint-Y-<Color>. In it there is a file index.theme, edit the first three lines:

Code: Select all

[Icon Theme]
Name=Mint-Y-<Color>
Inherits=Mint-X-<Color>,Mint-X,gnome,hicolor
The theme should then be selectable; don't mind the wrongly colored preview icon. It will use the Mint-Y app icons, but the appropriately colored Mint-X icons for things like folders, actions,...

For me, the icons only ran smoothly after restarting Cinnamon.

JosephM
Level 6
Level 6
Posts: 1120
Joined: Sun May 26, 2013 6:25 pm

Re: Linux Mint 18 - Editing Themes

Post by JosephM » Mon Jun 20, 2016 11:56 pm

The graphical tools available for adjusting color are totally useless in a lot of themes. Especially newer ones and are limited in what they can affect. Theming under Cinnamon is a bit confusing when you are new to it because there are a lot of different themes handling different areas. I'll see if I can break it down a bit. I'll use the default Mint-X as an example of where to find things. All paths will be found /usr/share/themes/Mint-X/

Window borders: These are controlled by the metacity theme. For cinnamon this will be in metacity-1/metacity-theme-3.xml

Icons: This one explains itself

Controls: This controls the theming inside of you actual application windows. It's actually made up of two themes. A gtk2 theme and a gtk3 theme depending on what toolkit the particular application uses. These are in the the gtk-2.0 and gtk-3.0 folder respectively.

Desktop: This controls the look of the actual Cinnamon shell. The panels and anything on them, overview, scale, the Alt+F2 run dialog, etc. This is found in the cinnamon folder.

As someone else pointed out the Mint-Y theme as it's distributed isn't really meant to be modified by hand. You can but it won't be fun. While getting started might be a bit more difficult, building it from source is ultimately the better solution. Maybe it would be worth writing some sort of tutorial on customizing and working with the theme?
When I give opinions, they are my own. Not necessarily those of any other Linux Mint developer or the Linux Mint project as a whole.

mchi
Level 1
Level 1
Posts: 15
Joined: Wed Jun 10, 2015 12:49 am

Re: Linux Mint 18 - Editing Themes

Post by mchi » Thu Sep 01, 2016 10:34 pm

I've tried to change the selected background color using the information from this forum post as well as others and nothing seems to work. Here is another forum I looked at.

viewtopic.php?t=142533

I've also tried downloading different themes, including Numix-Blue-Cinnamon but the selected background color is always green. Does anyone know of a theme that can be downloaded that already has a different selected background color? I'm beginning to doubt that this is even possible by modifying config files for specific themes.

User avatar
Odyseus
Level 2
Level 2
Posts: 53
Joined: Tue May 05, 2015 5:00 am

Re: Linux Mint 18 - Editing Themes

Post by Odyseus » Fri Sep 02, 2016 12:27 am

Hello, everybody.

@mchi: I recently published a theme on Spices website. While doing some final tests, it occurred to me to open Nemo (I don't use Nemo as my file manager). To my surprise, all selections background colors were green. After half an hour checking my theme for possible errors, I decided to change to another theme. Didn't matter to which theme I switched to, the selection background color in Nemo was stuck on green. All Gtk 2 and 3 applications respected the color of the currently selected theme. The only thing that fixed this behaviour was to log out and log back in. After that, Nemo started using the correct color defined by the currently selected theme.

JosephM
Level 6
Level 6
Posts: 1120
Joined: Sun May 26, 2013 6:25 pm

Re: Linux Mint 18 - Editing Themes

Post by JosephM » Fri Sep 02, 2016 4:10 am

Because Nemo handles the desktop it does not actually quit when you close the window. Sometimes theme changes will not take effect until an application is restarted. That's why Nemo starts to work once you log out and back in. For future reference, you can open a terminal and enter

Code: Select all

nemo -q
This will actually kill Nemo completely and you can restart it from the menu or panel launcher like normal. It saves you from doing the log out/in thing.
When I give opinions, they are my own. Not necessarily those of any other Linux Mint developer or the Linux Mint project as a whole.

mchi
Level 1
Level 1
Posts: 15
Joined: Wed Jun 10, 2015 12:49 am

Re: Linux Mint 18 - Editing Themes

Post by mchi » Fri Sep 02, 2016 10:45 am

JosephM, That is a really nice theme. However, I still see highlighted items in Nemo as green. I've attached a screenshot. This is after logging out and logging back in, using the nemo -q command, and even rebooting. I'm using Linux Mint 18 btw.

JosephM
Level 6
Level 6
Posts: 1120
Joined: Sun May 26, 2013 6:25 pm

Re: Linux Mint 18 - Editing Themes

Post by JosephM » Fri Sep 02, 2016 1:30 pm

The Gtk theme you are using looks like Mint-X. Mint already includes color variations of that theme. You can use them from Cinnamon settings->Themes by changing the theme used for "Controls".
When I give opinions, they are my own. Not necessarily those of any other Linux Mint developer or the Linux Mint project as a whole.

mchi
Level 1
Level 1
Posts: 15
Joined: Wed Jun 10, 2015 12:49 am

Re: Linux Mint 18 - Editing Themes

Post by mchi » Fri Sep 02, 2016 1:54 pm

JosephM, I had selected your new theme but did not change anything under controls. I can't believe that was the change that was necessary. I spent hours trying to change config files. Thank you so much for your help.

User avatar
Odyseus
Level 2
Level 2
Posts: 53
Joined: Tue May 05, 2015 5:00 am

Re: Linux Mint 18 - Editing Themes

Post by Odyseus » Fri Sep 02, 2016 4:22 pm

Hello, everybody.
JosephM wrote:Because Nemo handles the desktop it does not actually quit when you close the window.
I didn't know this. I always learn something new from your useful comments. Thanks, JosephM.
JosephM wrote:Sometimes theme changes will not take effect until an application is restarted.
I was aware of this. The weird thing is that I always was able to see the theme changes in real time, even with Nemo, but this time it got stuck on green. Next time that this happens, I will have in mind the command you posted.
JosephM wrote:The Gtk theme you are using looks like Mint-X. Mint already includes color variations of that theme.
Just an FYI. About the theme that mchi is referencing. It is based on Mint-X, but the blue color used is not the same as Mint-X-Blue, it is the blue used by the Greybird theme (a brighter blue). Plus, I changed all controls to the ones used by the Mint-Y theme (the only thing that I liked of that theme).

Post Reply

Return to “Cinnamon”