Description: Configurable grayscale effect for KWin window manager and KDE desktop environment.
Download or Git Pull Copy "kwin4_effect_grayscale" folder to "/usr/share/kwin/effects" Copy "kwin4_effect_grayscale.desktop" to "/usr/share/kservices5/kwin" Add "kwin4_effect_grayscaleEnabled=true" to "[Plugins]" section in "~/.config/kwinrc"
Known Quirks Settings doesn't apply: In System Settings, uncheck "Grayscale" and re-check then apply.Last changelog:
10Really this should be in default effects. Or even as a variant of night light (BTW incorporating schedule and hotkey settings would be a good idea).
Few more notes:
- was initially searching for it as "desaturate" (former Gnome user here).
- would be nice to cooperate with devs of "Burn-My-Windows" effects, so that it respect grayscale mode on (eg this one: https://store.kde.org/p/1982142 - problem is that open/close window effect are still showed in color).
Thanks for keep the Community World spinning.
10Here is a command you can put in a script and call with a Global Keyboard Shortcut:
kwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled "true"
sleep 0.2
qdbus org.kde.KWin /Compositor suspend
Thank you for this! Incorporating your suggestions, I wrote this script that toggles the grayscale on and off: ``` #!/bin/bash ;
greyscaleEnabled=$(kreadconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled) ;
kwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled $((!$greyscaleEnabled)) ;
sleep 0.2 ;
qdbus org.kde.KWin /Compositor suspend ;
qdbus org.kde.KWin /Compositor resume``` If you save this as `filename.sh` you can run it using `sh ~/path/to/filename.js` and even save that command to a keyboard shortcut if you like. I hope this helps someone!
Ratings & Comments
13 Comments
10 Great feature; agree that it should be a part of the main distribution.
10 Really this should be in default effects. Or even as a variant of night light (BTW incorporating schedule and hotkey settings would be a good idea). Few more notes: - was initially searching for it as "desaturate" (former Gnome user here). - would be nice to cooperate with devs of "Burn-My-Windows" effects, so that it respect grayscale mode on (eg this one: https://store.kde.org/p/1982142 - problem is that open/close window effect are still showed in color). Thanks for keep the Community World spinning.
10 Works :)
10 10 the best, only works with composition on, of course.
10 Here is a command you can put in a script and call with a Global Keyboard Shortcut: kwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled "true" sleep 0.2 qdbus org.kde.KWin /Compositor suspend
kwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled "true"; sleep 0.2; qdbus org.kde.KWin /Compositor suspend
kwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled "true"; sleep 0.2; qdbus org.kde.KWin /Compositor suspend; qdbus org.kde.KWin /Compositor resume
Thank you for this! Incorporating your suggestions, I wrote this script that toggles the grayscale on and off: ``` #!/bin/bash ; greyscaleEnabled=$(kreadconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled) ; kwriteconfig5 --file ~/.config/kwinrc --group Plugins --key kwin4_effect_grayscaleEnabled $((!$greyscaleEnabled)) ; sleep 0.2 ; qdbus org.kde.KWin /Compositor suspend ; qdbus org.kde.KWin /Compositor resume``` If you save this as `filename.sh` you can run it using `sh ~/path/to/filename.js` and even save that command to a keyboard shortcut if you like. I hope this helps someone!
9 Love it! Exactly what I was looking for. Still works in KDE Plasma 5. Wish this was included as part of KDE Plasma.
Would love to use it for focus work but without any keyboard shortcuts it's too big of a hassle to switch it on and off
9 Basic accessibility setting that is actually missing in KDE. Well done!
9 +