Toggle KDE Color Blindness Correction from CLI

Hi, I am somewhat colorblind and really like the filters introduced recently. However, I only need them when I am unsure about colors (i.e. looking at graphs) and prefer them to be off otherwise.

I have so far managed to change the setting by using

kwriteconfig5 --file kwinrc --group 'Plugins' --key "colorblindnesscorrectionEnabled" true/false

but I can’t seem to apply them without doing a full reboot, which obviously makes it quite pointless.

If anyone could point me in the right direction to “apply” from the cli, I would be greatful for your help!

It seems you are using Plasma 5, for plasma 6 you need to use kwriteconfig6.

As a workaround, you can put this script in .bash_profile so that it runs on login, or in the startup programs in systemsettings.

First of all, thanks for your help!

My goal in the end is to activate it only when needed using a keyboard shortcut so that I can have the normal colors most of the time. Therefore a reboot would be rather impractial. Changing the setting itself works using kwriteconfig6 but it is not applied (as in I can see the change happens in the settings but the filter itself is not applied until I reboot).

I have found the solution for anyone stumbling upon this. I found the name of the filter in KDE’s debug console and then use qdbus to toggle the effect:

qdbus --literal org.kde.KWin /Effects org.kde.kwin.Effects.toggleEffect colorblindnesscorrection

I put that into a shell script and can now toggle it with a keyboard shortcut which is very convenient.

1 Like