Open fedorovenskiy opened 5 years ago
https://github.com/murat-cileli/kwin-grayscale-effect/issues/2#issue-490497040
@fedorovenskiy, what does binding refer to in this context?
@BEEDELLROKEJULIANLOCKHART, I suppose it means that you can login, and the effect will be active right from the start. But I don't yet know how to do that.
here's a solution If what you mean by bind is a way to toggle the effect through a keyboard shortcut. i'm on kde 5.27.5
.
the terminal command for toggling it.
qdbus org.kde.KWin.Effect.WindowView1 /Effects org.kde.kwin.Effects.toggleEffect kwin4_effect_grayscale
Command/url
qdbus org.kde.KWin.Effect.WindowView1 /Effects org.kde.kwin.Effects.toggleEffect kwin4_effect_grayscale
in the Action tab and on the Trigger tab add your shortcut key.here's a solution
I was looking for this answer in theory, but that command returned Cannot find 'org.kde.kwin.Effects.toggleEffect' in object /Effects at org.kde.KWin.Effect.WindowView1
for me.
Here's what worked for me:
filename.sh
with the following code:
#!/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
sh path/to/filename.sh
in the Action tab mentioned aboveThank you to @RomanMunar and to iceman7789 from the comments at the KDE Store for helping me get to a solution that worked with my setup!
Yeah would add that I had installed mine manually(instruction on README) and not from the KDE store 👍️
Yeah would add that I had installed mine manually(instruction on README) and not from the KDE store 👍️
Oh yeah, me too. I only found out that it was on the KDE Store when I was searching for shortcut solutions. I think it should work either way though.
it is not possible to bind this effect, and this is very important to not open system settings every time I need to disable|enable this function