D14850: [effects] Turn off Translucency by default

Vlad Zagorodniy <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
zzag added a comment.


  In D14850#309544 <https://phabricator.kde.org/D14850#309544>, @ngraham wrote:
  
  > Do we have any documentation for these? I've never written one before.
  
  
  https://techbase.kde.org/Development/Tutorials/Updating_KConfig_Files
  
  Also, take a look at KMail.
  
  In D14850#309545 <https://phabricator.kde.org/D14850#309545>, @ngraham wrote:
  
  > Wouldn't this turn it on for people who had previously turned it off?
  
  
  No, it will not. kwin4_effect_tranlslucencyEnabled will be already set to false.
  
  Anyway, here's content of upd file:
  
    Version=5
    
    # Make the Translucency effect disabled by default.
    Id=make-translucency-effect-disabled-by-default
    File=kwinrc
    Group=Plugins
    Script=kwin-5.14-disable-translucency-effect.sh,sh
  
  kwin-5.14-disable-translucency-effect.sh:
  
    #!/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
  
  Not sure if `grep -q "\[Effect-kwin4_effect_translucency\]" "$kwinrcname"` is right thing to do.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D14850

To: ngraham, #vdg, #kwin, abetts, mart, zzag
Cc: luebking, broulik, davidedmundson, filipf, zzag, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.