I'm very new to KDE (running Kubuntu 18.10) and want to be able to quickly toggle grayscale through the terminal. I can make the script to do this but I don't know what to call to toggle the Desktop Effect.
Currently I'm using the extension described in this answer from this Github reop. Everything works great, the only problem is that I want to quickly switch to grayscale instead of going into System Settings
> Desktop Behavior
>Desktop Effects
and click Apply
. This is way to many steps for me to use more than once or twice a day.
My question is what command do I call to toggle this from the command line so I can write a script to do this?
I'm looking at the qdbus and trying something like:
qdbus org.kde.KWwin /Effects toggleEffect Grayscale
But nothing happens.
kwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled "false"
(or "true"), you need to reload KWin to effect the change.kwin_x11 --replace & disown
reloads KWin but may make the system unstable! There maybe a better way of which I'm not aware. – DK Bose Mar 19 '19 at 10:20qdbus org.kde.KWin /KWin reconfigure
which I found here but haven't tried. zren is a KDE developer. – DK Bose Mar 19 '19 at 10:27