kconfig_update for auto border size introduction
ClosedPublic

Authored by romangg on Jun 11 2018, 3:08 PM.

Details

Summary

If a user has set his border size explicitly in the past also respect this
selection with the new auto border size mode by setting auto borders to
false on update.

For this a kconf_update file and a sed based shell script is added.

Test Plan

Manually.

Diff Detail

Repository
R108 KWin
Branch
borderSizeRecommendKconfUpdate
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 11513
Build 11531: arc lint + arc unit
romangg created this revision.Jun 11 2018, 3:08 PM
Restricted Application added a project: KWin. · View Herald TranscriptJun 11 2018, 3:08 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Jun 11 2018, 3:08 PM
davidedmundson added inline comments.
helpers/kconf_update/kwin-5.14-auto-bordersize.sh
3 ↗(On Diff #36008)

You can use kconf_update to do most the work for you with

File=kwinrc
Group=org.kde.kdecoration2
Script=blah

" If the Script command was issued after a Group command the behavior is slightly different: All entries from <oldfile>/<oldgroup> are piped into <_script>. The output of script is used as new entries for <newfile>/<newgroup>, unless a different group is specified with [group]. Existing entries can be deleted from <oldgroup> by adding lines with #DELETE key
"

zzag added a subscriber: zzag.

Why the kconf_update/ dir is in helpers/? That doesn't look like a helper.

In D13480#277125, @zzag wrote:

Why the kconf_update/ dir is in helpers/? That doesn't look like a helper.

Didn't want to add yet another top level directory. Sounds like an helper to me.

romangg updated this revision to Diff 36020.Jun 11 2018, 6:34 PM
  • Use kconf_update mechanism instead of sed
romangg marked an inline comment as done.Jun 11 2018, 6:34 PM
davidedmundson accepted this revision.Jun 11 2018, 7:11 PM

That's a trillion times more readable ++

I don't get why you're checking for BorderSizeAuto as you're adding that at the same time as you're adding this update file, so you know no-one will have it set...but it's fine.

(obviously don't push it without the other patches)

helpers/kconf_update/kwin-5.14-auto-bordersize.sh
16 ↗(On Diff #36020)

The docs imply you don't need to do this.

This revision is now accepted and ready to land.Jun 11 2018, 7:11 PM
romangg updated this revision to Diff 57497.May 3 2019, 6:25 PM

Rebase on master.

This revision was automatically updated to reflect the committed changes.