PDA

View Full Version : [ubuntu] How to change or refresh the Unity theme with command line?



NBPX
April 30th, 2013, 12:18 AM
I'm developing my own theme based on Radiance. It's on .themes folder on my home folder and I can change the theme manually with Unity Tweak Tool.

I would like to update the theme programmatically with shellscript after some change on a .css file of the theme.

diesch
April 30th, 2013, 12:36 AM
GTK theme:

gsettings set org.gnome.desktop.interface gtk-theme your_theme

Window manager theme:

gsettings set org.gnome.desktop.wm.preferences theme your_theme

NBPX
April 30th, 2013, 12:55 AM
Thanks!

What is the difference between GTK theme and Windows manager theme?

diesch
April 30th, 2013, 03:55 AM
Basically the GTK theme is about what's inside a window and the window manager theme is about the window borders.

vasa1
April 30th, 2013, 03:58 AM
Basically the GTK theme is about what's inside a window and the window manager theme is about the window borders.Is your solution limited to Unity or can users of K/L/Xubuntu use it as well?

Edit: it doesn't seem to do anything in Lubuntu 13.04. No error message in the terminal either.

gsettings set org.gnome.desktop.interface gtk-theme Radiance
(I have installed light-themes and so Ambiance and Radiance are available to me and both are functional.)

diesch
April 30th, 2013, 04:31 AM
It uses the Gnome configuration system and works in Unity and Gnome but not in KDE, XFCE and LXDE.

I didn't check, but I guess it's basically the same as Unity Tweak Tool is doing.

vasa1
April 30th, 2013, 04:46 AM
Okay and thanks for clarifying!

NBPX
May 2nd, 2013, 07:30 PM
How to update the theme of a window, that is already open, without to reopen it?

This command changes the system theme, but based on preliminar tests, it is necessary to reopen the windows to see the result.

I know it's possible. The tweak tools do it.