print("Warning: Output %s has a transformation applied. Could not determine correct mode! Using `%s'." % (match["output"], options["mode"]), file=sys.stderr)
if match["gamma"]:
gamma = match["gamma"].strip()
print("Warning: Output %s has a transformation applied. Could not determine correct mode! Using `%s'." % (match["output"], options["mode"]), file=sys.stderr)
if match["gamma"]:
gamma = match["gamma"].strip()
+ # xrandr prints different values in --verbose than it accepts as a parameter value for --gamma
+ # Also, it is not able to work with non-standard gamma ramps. Finally, it auto-corrects 0 to 1,
+ # so we approximate by 1e-10.
+ gamma = ":".join([ str(max(1e-10, round(1./float(x), 3))) for x in gamma.split(":") ])