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

Changing themes from the command line

Tags: None
(comma "," separated)
steelstring94
Registered Member
Posts
2
Karma
0
I am trying to create a script that will automatically switch between the light and dark themes at appropriate times of day. To do that I obviously need to be able to change the themes from the command line.

I noticed ~/.kde/share/config/kdeglobals seems to change when the theme is changed, so I figured I would just create a kdeglobals.light and kdeglobals.dark and conduct renaming and reloading at appropriate times.

However, as I've discovered, merely changing this file does not cause a change in the actual theme.

My question is, what command can be issued to force KDE to reload this file and make the appropriate changes?

-steelstring94
kde-cfeck
Registered Member
Posts
93
Karma
0
The Colors KCM uses D-Bus to notify applications of the color changes.

https://cgit.kde.org/plasma-desktop.git ... m.cpp#n396 says it sends a "notifyChange" message with two empty arguments to D-Bus object "org.kde.KGlobalSettings /KGlobalSettings". Additionally, kwin is also notifyed via "reloadConfig" message to "org.kde.KWin /KWin".

I am no D-Bus expert, but this might help you get going.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]