Control Plasma via cli - commands needed

Hi there,

I’m playing with a themeswitcher script just for my needs. Most scripts / tools out there do not do what I want.

I currently only use breeze following the colorscheme.

I found out how to switch wallpaper and colorscheme (plasma-apply-… commands)

Now I want to set the Window Decoration Shadow to sth. else for the dark colorscheme as dark shadow on dark colorscheme does not give me a good contrast.

I found out that the .config/breezerc file is being modified for that when using GUI. When I modify this file with my script nothing happens. I may need to reolad something?!

But anyway: modifying files is not very elegant. I’m looking for a suitable command to do this.

Do you know a good documentation where to find all available commands to do such modifications. Or do I need this dbus stuff?

Any ideas welcome.
Thanks in advance!

Edit: it’s NOT lookandfeeltool I’m looking for…
Edit2: plasmashell --replace is way too much…

qdbus is probably what you are looking for. For instance
qdbus org.kde.KWin /KWin org.kde.KWin.setCurrentDesktop 2 switches to virtual desktop 2.
You can basically do anything in KDE with the qdbus command but you need to look it up yourself or experiment with tab autocomplete because I barely use it.

1 Like

good point to start googling :wink:

You can use a program called Qt QDBusViewer. It should be installed on your computer if you’re using Plasma.

With it, you can explore all the QDBus commands. What you can do with it is actually quite limited.

Don’t bother asking on the KDE Community forum, that place is as useful as a chocolate teapot. There’s pretty much one active user there, and she’s absolutely clueless :rofl:

1 Like

Thanks all for your tips. I played around a bit and got “sth.” to work.

Switch colorscheme / wallpaper / lockscreenwallpaper / windows shadow color / vs code theme / konsole proile.

Toggles if no parameter set or switches to light/dark (optionally darker) colors.

May be calles by another script that does the toggling depending on sunrise/sunset.

Link to first try of bash is here:

If anyone is interested :wink: