diff --git a/kconf_update/CMakeLists.txt b/kconf_update/CMakeLists.txt index f30a6f607..8d1756ec2 100644 --- a/kconf_update/CMakeLists.txt +++ b/kconf_update/CMakeLists.txt @@ -1,4 +1,6 @@ install(FILES kwin.upd DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR}) install(PROGRAMS kwin-5.16-auto-bordersize.sh DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR}) +install(PROGRAMS kwin-5.18-move-animspeed.py + DESTINATION ${KDE_INSTALL_KCONFUPDATEDIR}) diff --git a/kconf_update/kwin-5.18-move-animspeed.py b/kconf_update/kwin-5.18-move-animspeed.py new file mode 100644 index 000000000..7f8df9967 --- /dev/null +++ b/kconf_update/kwin-5.18-move-animspeed.py @@ -0,0 +1,14 @@ +#!/bin/env python + +import fileinput + +speed_map = [0, 0.25, 0.5, 1, 2, 4, 20] + +for line in fileinput.input(): + if not line.startswith("AnimationSpeed="): + continue + speed = int(line[len("AnimationSpeed="):]) + if speed < 0 or speed >= len(speed_map): + continue + print("AnimationDurationFactor=%f" % speed_map[speed]) + print("# DELETE AnimationSpeed") #special kconf syntax to remove the old key diff --git a/kconf_update/kwin.upd b/kconf_update/kwin.upd index 622091896..7072156c4 100644 --- a/kconf_update/kwin.upd +++ b/kconf_update/kwin.upd @@ -1,33 +1,39 @@ Version=5 # Replace old Scale in effect with Scale effect. Id=replace-scalein-with-scale File=kwinrc Group=Plugins Key=kwin4_effect_scaleinEnabled,scaleEnabled # Port the Minimize Animation effect to JavaScript. Id=port-minimizeanimation-effect-to-js File=kwinrc Group=Plugins Key=minimizeanimationEnabled,kwin4_effect_squashEnabled # Port the Scale effect to JavaScript. Id=port-scale-effect-to-js File=kwinrc Group=Effect-Scale,Effect-kwin4_effect_scale AllKeys Group=Plugins Key=scaleEnabled,kwin4_effect_scaleEnabled # Port the Dim Screen effect to JavaScript. 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 + +# Move AnimationSpeed to kdeglobals as AnimationDurationFactor converting to a useful value +Id=animation-speed +File=kwinrc,kdeglobals +Group=Compositing,KDE +Script=kwin-5.18-move-animspeed.py,python