From b29f211fe400735918e5970b5aa8b86dd8af624f Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Fri, 14 May 2021 08:37:35 -0600 Subject: [PATCH] Disable translucency effect by default Many reasons have been brought up over the years for why this effect is not appropriate to be enabled by default: - It was designed to highlight the whizzy technical feature of being able to make windows transparent, which is no longer particularly impressive today. - It looks visually dated. - It can produce a confusing visual soup by blending a window being moved or resized with the content below it, which we recently disabled for the Highlight Windows effect. - If one window is covering up another as a way to deliberately hide the content of the lower window, this effect will reveal the hidden content whenever the upper window is moved or resized at all. Overall it does not seem to have enough advantages to offset these issues. Let's disable it by default--but only for the people who did not modify its configuration at all. We can assume that those people like it, so let's keep it on for them. BUG: 384054 FIXED-IN: 5.23 Closes Phab task T7915 --- .../kwin-5.23-disable-translucency-effect.sh | 23 +++++++++++++++++++ kconf_update/kwin.upd | 6 +++++ .../translucency/package/metadata.desktop | 1 - 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 kconf_update/kwin-5.23-disable-translucency-effect.sh diff --git a/kconf_update/kwin-5.23-disable-translucency-effect.sh b/kconf_update/kwin-5.23-disable-translucency-effect.sh new file mode 100644 index 0000000000..95bb3bd79a --- /dev/null +++ b/kconf_update/kwin-5.23-disable-translucency-effect.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +HAS_ENABLED_KEY='' +HAS_CUSTOM_CONFIG='' + +kwinrcname=`qtpaths --locate-file GenericConfigLocation kwinrc` +if [ -f "$kwinrcname" ]; then + if grep -q "\[Effect-kwin4_effect_translucency\]" "$kwinrcname"; then + HAS_CUSTOM_CONFIG=1 + fi +fi + +while read -r line; do + KEY="${line%=*}" + if [ "$KEY" == "kwin4_effect_translucencyEnabled" ]; then + HAS_ENABLED_KEY=1 + fi + echo "$line" +done + +if [ -n "$HAS_CUSTOM_CONFIG" ] && [ -z "$HAS_ENABLED_KEY" ]; then + echo "kwin4_effect_translucencyEnabled=true" +fi diff --git a/kconf_update/kwin.upd b/kconf_update/kwin.upd index 0ddfaf2905..bf7a7b1a70 100644 --- a/kconf_update/kwin.upd +++ b/kconf_update/kwin.upd @@ -49,3 +49,9 @@ Id=no-swap-encourage File=kwinrc Group=Compositing Script=kwin-5.21-no-swap-encourage.py,python3 + +# Make the Translucency effect disabled by default +Id=make-translucency-effect-disabled-by-default +File=kwinrc +Group=Plugins +Script=kwin-5.23-disable-translucency-effect.sh,sh diff --git a/src/effects/translucency/package/metadata.desktop b/src/effects/translucency/package/metadata.desktop index c09ca6fbc4..65b138beab 100644 --- a/src/effects/translucency/package/metadata.desktop +++ b/src/effects/translucency/package/metadata.desktop @@ -162,7 +162,6 @@ X-KDE-PluginInfo-Name=kwin4_effect_translucency X-KDE-PluginInfo-Version=0.1.0 X-KDE-PluginInfo-Category=Appearance X-KDE-PluginInfo-License=GPL -X-KDE-PluginInfo-EnabledByDefault=true X-KDE-Ordering=50 X-Plasma-API=javascript X-Plasma-MainScript=code/main.js