File indexing completed on 2024-05-05 17:36:17

0001 #!/usr/bin/env python3
0002 
0003 import fileinput
0004 
0005 speed_map = [0, 0.25, 0.5, 1, 2, 4, 20]
0006 
0007 for line in fileinput.input():
0008     if not line.startswith("AnimationSpeed="):
0009         continue
0010     speed = int(line[len("AnimationSpeed="):])
0011     if speed < 0 or speed >= len(speed_map):
0012         continue
0013     print("AnimationDurationFactor=%f" % speed_map[speed])
0014     print("# DELETE AnimationSpeed") #special kconf syntax to remove the old key