4

How can I use KWin to obtain a grayscale effect in Kubuntu 18.04?

DK Bose
  • 44,553

1 Answers1

3

Murat Çileli has developed KWin Grayscale Effect which, according to this reddit thread is

a fullscreen, configurable grayscale effect for KWin / KDE

If you want this effect,

  • Download the tar and extract it.

  • Run sudo cp -r kwin4_effect_grayscale /usr/share/kwin/effects

  • Run sudo cp kwin4_effect_grayscale.desktop /usr/share/kservices5/kwin

  • And edit the [Plugins] section of ~/.config/kwinrc to have kwin4_effect_grayscaleEnabled=true on its own line. In case the [Plugins] section is missing from your kwinrc, just add it.

To test it for the first time, open System Settings > Desktop Behavior. In there, open Desktop Effects. You should see Grayscale in the Appearance section. Toggle it a couple of times, and you'll see the grayscale effect at work.

Grayscale off:

Grayscale off

Grayscale on:

Grayscale on

Further configuration is possible. From the gitlab link:

A configuration file should be placed in /usr/share/kwin/effects/kwin4_effect_grayscale/contents/config/main.xml.

And available parameters are:

  • ApplyInactiveWindowsOnly (boolean) : Effect applies to inactive windows only if it's set true.

  • ExcludePanels (boolean) : Effect does not apply to panels if it's set true.

  • EffectStrength (integer): Effect strength by percentage (%).

DK Bose
  • 44,553