This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to change plasma theme and colors from the command line?

Tags: None
(comma "," separated)
User avatar
gerlos
Registered Member
Posts
73
Karma
0
OS
Hello everyone!
I'm looking for a way to change the plasma theme and the color theme from the command line or from a python script.
I need to switch back and forth a dark plasma and color theme for night operation to a bright plasma and color theme for daylight operation.

I guess I have to tinker with d-bus commands, and I played for a while with qdbus and qdbusviewer, but couldn't find any solution this way.

Any clue?
Thanks in advance
gerlos


"Fairy tales are more than true, not because they tell us that dragons exist, but because they tell us that dragons can be beaten."
G. K. Chesterton
web: http://gerlos.altervista.org
gerlos +- - - > gnu/linux registred user #311588
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You will need to stop Plasma, ( kquitapp plasma-desktop ), wait for it to close, then use "kwriteconfig" to update the appropriate key in "plasmarc" located in ~/.kde4/share/config


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
gerlos
Registered Member
Posts
73
Karma
0
OS
Thanks for the answer!
I need one more hint, if possible...

Looking inside ~/.kde/share/config/plasmarc I can't find nothing related to colors or theme. Here's what is there:
$ cat ~/.kde/share/config/plasmarc
[$Version]
update_info=plasma_popupapplet_fix_groups.upd:PlasmaPopupAppletFixGroups2

[Theme-amarok]
name=Amarok-Mockup

I looked inside other (apparently) plasma-related files, but couldn't find anything related. Even grep-ing all the files in that directory I couldn't find any file containing my color theme name or my plasma theme name.

Any hint?

regards
gerlos


"Fairy tales are more than true, not because they tell us that dragons exist, but because they tell us that dragons can be beaten."
G. K. Chesterton
web: http://gerlos.altervista.org
gerlos +- - - > gnu/linux registred user #311588
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Plasma Desktop itself uses a key "name" in the group "Theme" in "plasmarc" to store the setting. If you wish to use the default setting, simply remove the key.

( For the Oxygen theme for instance, the name is "oxygen" so the key's value is "oxygen" - quotes removed )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], ourcraft