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

How to change the color scheme from a bash script

Tags: None
(comma "," separated)
User avatar
MirceaKitsune
Registered Member
Posts
330
Karma
0
OS
I'm dealing with an annoyance I can't find my way around: I created a script to rotate between a few color schemes when I log in. I'm calling my script from ~/.profile to ensure that the change is made before the system starts, so every component detects the modification and applies the new colors. I'm not looking to apply the scheme while the system is running, as I know this requires a special call only the Apply button in the setting menu provides, and even then the update is only partial.

What I'm doing: The script simply uses the 'sed' command to modify the "ColorScheme=" parameter(s) inside of ~/.config/kdeglobals and point them to the desired scheme. The replacement operation works flawlessly, and if I go to System Settings - Appearance - Colors I can even see the new scheme selected.

The problem: The new colors are not actually applied. Even if I log out and back in repeatedly, I see only the last color scheme I manually applied from the settings menu. That menu offers a hint: If I select the scheme called Current at the top of the list, its preview also shows the old theme that I'm stuck with.

How do I actually update the colors being used from bash? Is the active scheme cached, in which case I need to delete the cache file? Or is it stored inside its own *.colors file? It's not in ~/.local/share/color-schemes where only my color schemes are saved, and I couldn't find it in ~/.cache or any other location either.


Bookmarks



Who is online

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