kconfig_update for auto border size introduction
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. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: zzag, davidedmundson, kwin Tags: #kwin Maniphest Tasks: T8707 Differential Revision: https://phabricator.kde.org/D13480
This commit is contained in:
parent
d51b8dc093
commit
d3ad6bc0b9
3 changed files with 32 additions and 0 deletions
|
@ -1,2 +1,4 @@
|
|||
install(FILES kwin.upd
|
||||
DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
|
||||
install(PROGRAMS kwin-5.16-auto-bordersize.sh
|
||||
DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR})
|
||||
|
|
24
kconf_update/kwin-5.16-auto-bordersize.sh
Normal file
24
kconf_update/kwin-5.16-auto-bordersize.sh
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
HAS_SIZE=''
|
||||
HAS_AUTO=''
|
||||
|
||||
while read -r line
|
||||
do
|
||||
# substring from beginning to equal sign
|
||||
ENTRY="${line%%=*}"
|
||||
if [ "$ENTRY" = "BorderSize" ]; then
|
||||
HAS_SIZE=1
|
||||
fi
|
||||
if [ "$ENTRY" = "BorderSizeAuto" ]; then
|
||||
HAS_AUTO=1
|
||||
fi
|
||||
echo "$line"
|
||||
done
|
||||
|
||||
if [ -n "$HAS_SIZE" -a -z "$HAS_AUTO" ]; then
|
||||
# unset auto borders if user has set a border
|
||||
# size in the past (for good measure make
|
||||
# also sure auto borders are not yet set)
|
||||
echo "BorderSizeAuto=false"
|
||||
fi
|
|
@ -25,3 +25,9 @@ Id=port-dimscreen-effect-to-js
|
|||
File=kwinrc
|
||||
Group=Plugins
|
||||
Key=dimscreenEnabled,kwin4_effect_dimscreenEnabled
|
||||
|
||||
# Deactivate auto border size if the user has changed border size in the past
|
||||
Id=auto-bordersize
|
||||
File=kwinrc
|
||||
Group=org.kde.kdecoration2
|
||||
Script=kwin-5.16-auto-bordersize.sh,sh
|
||||
|
|
Loading…
Reference in a new issue