Script for disabling blur

Can someone help to write a script that enables/disables blur when the script runs?? :sweat_smile: :sweat_smile:

If you mean in plasma, you can disable compositing automatically when certain windows are open. There is also a shortcut to disable/enable compositing.


@Capt_n3m0 not to be a dick, but expecting other users to script you a solution is a bit presumptuous.

You should have linked to that thread so that others knew what your issue relates to.

If you want to find a solution to an issue via scripting you learn nothing by expecting others to do it for you. The standard method of asking for assistance is to attempt to write your own version first. You present your version on the forum and then others will give you tips on how you can improve things if necessary. You learn nothing by expecting everyone else to fill in the blanks for you.

I'm not trying to be rude or mean, I'm actually trying to help you learn the basics for yourself. In the long run you will be much happier using Linux if you start learning how to do this stuff yourself.

Try posting a preliminary version of what you want to do with your script.

Also, take @dalto 's comments to mind as scripting a solution is likely unnecessary.


Never mind script, here is command. (actually, there are 3 commands. Instead of clubbing them to script, I clubbed them in one command using &&, for the sake of simplicity)

To enable

sed -i '/^blurEnabled=false/c\blurEnabled=true' ~/.config/kwinrc && kquitapp5 plasmashell && kstart5 plasmashell

To disable

sed -i '/^blurEnabled=true/c\blurEnabled=false' ~/.config/kwinrc && kquitapp5 plasmashell && kstart5 plasmashell

Wasn't this about only one app window?

Nevertheless, if there was no sed (nightmare!! :scream: ), KDE has its own config writing features and also sending signal commands to kWin etc.

I have no transparent windows enabled to be sure it works, but you may test these (you must have Blur enabled in Settings):

# Disable blur
dbus-send --print-reply --session --dest=org.kde.KWin /Effects org.kde.kwin.Effects.unloadEffect string:"blur"
# Enable blur
dbus-send --print-reply --session --dest=org.kde.KWin /Effects org.kde.kwin.Effects.loadEffect string:"blur"

# Using qdbus

# Disable blur
qdbus org.kde.KWin /Effects org.kde.kwin.Effects.unloadEffect string:"blur"
# Enable blur
qdbus org.kde.KWin /Effects org.kde.kwin.Effects.loadEffect string:"blur"

To edit/add/remove values in KDE configuration files:

# Change blur to disabled
kwriteconfig5 --file "kwinrc" --group "Plugins" --key "blurEnabled" false
# Change blur to enabled
kwriteconfig5 --file "kwinrc" --group "Plugins" --key "blurEnabled" true

For all cases above, it should be required to reload kWin to have effect:

qdbus org.kde.KWin /KWin reconfigure

Play more and give feedback, so we make it to a tutorial :wink:


Sorry but I am actually new to linux. :slightly_smiling_face:
And i am tring to learn more on it.

Thanks, it worked

Rather than necrobumping an old thread it is preferred to simply give someone a "like" as a form of thank you for a useful contribution.

Necrobumping old technical help threads is discouraged on our forum unless you are adding something new and substantive in the way of information contributing towards a fix.