78a66fcfc9
Test Plan: Tested output piping test lines into the script with different settings Removed from my kdeglobals Invoked script. New value appeared (note that if you manually test multiple times locally you have to cleanup the $version info from both kdeglobals and kwinrc or the migration will be skipped) Reviewers: zzag Reviewed By: zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D24084
14 lines
422 B
Python
14 lines
422 B
Python
#!/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
|