X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=blobdiff_plain;f=autorandr.py;h=44448e48e0ea4fe152cd327fb63dd3b855f1c22a;hp=7463b19f38c2225e6d4347e88c4cc174ad1d330e;hb=58f72858d91c52aa6acaed6a6648209a61e76f66;hpb=0b100b0ecdcdb0f161e67eb23e4af4f47243c1cb diff --git a/autorandr.py b/autorandr.py index 7463b19..44448e4 100755 --- a/autorandr.py +++ b/autorandr.py @@ -726,7 +726,9 @@ def generate_virtual_profile(configuration, modes, profile_name): configuration[output].options["rate"] = mode["rate"] configuration[output].options["pos"] = "0x0" scale = max(float(biggest_resolution["width"]) / float(mode["width"]) ,float(biggest_resolution["height"]) / float(mode["height"])) - configuration[output].options["scale"] = "{}x{}".format(scale, scale) + mov_x = (float(mode["width"])*scale-float(biggest_resolution["width"]))/-2 + mov_y = (float(mode["height"])*scale-float(biggest_resolution["height"]))/-2 + configuration[output].options["transform"] = "{},0,{},0,{},{},0,0,1".format(scale, mov_x, scale, mov_y) else: configuration[output].options["off"] = None return configuration