CLI commands to switch between theming settings

I just switched to Plasma 6.

I used to use Yin-Yang to switch between light and dark themes; however this tool is limited, so I can’t for example choose icon themes and window decorations.

However Yin-Yang offers to run a custom script while switching, so is there a way to write a script that makes KDE switch between different window decorations and icon themes?

I’ve tried a few dbus commands, along with using kpackagetool6, but I almost couldn’t find any thourough documentation about these commands, so in the end nothing worked.


You could try konsave - however, you do need to log out/in again to fully apply many settings.

The colorscheme is a simple affair, however, get yourself a list:

plasma-apply-colorscheme -l

Perhaps an advantage of using fish shell, if I simply type plasma- I can also discover more available commands.

This means you could change the whole setup (probably best done with a list of commands in a bash script, and put that in $PATH) by pulling up krunner and typing the name…

So I can type ‘primary’ then ‘marble’ or ‘light’ to choose a lighter theme (as my ‘primary’ is pretty dull, mid to dark grey tones etc).

So to choose the top item (don’t forget \ delimiter)
plasma-apply-colorscheme 0001\ PrimaryD

Save your script with the name by which you want to evoke it (primaryd is good, it avoids having to remember to hit Shift for caps).

Otherwise, make an abbreviation or something - but this won’t affect the terminal colourscheme.

1 Like