Usage: autorandr [options]
-h, --help get this small help
--c, --change reload current setup
+-c, --change automatically load the first detected profile
-d, --default <profile> make profile <profile> the default profile
-l, --load <profile> load profile <profile>
-s, --save <profile> save your current setup to profile <profile>
o_left, o_top = map(int, output.options["pos"].split("x"))
o_width += o_left
o_height += o_top
+ if "panning" in output.options:
+ match = re.match("(?P<w>[0-9]+)x(?P<h>[0-9]+)(?:\+(?P<x>[0-9]+))?(?:\+(?P<y>[0-9]+))?.*", output.options["panning"])
+ if match:
+ detail = match.groupdict()
+ o_width = int(detail.get("w")) + int(detail.get("x", "0"))
+ o_height = int(detail.get("h")) + int(detail.get("y", "0"))
width = max(width, o_width)
height = max(height, o_height)
return int(width), int(height)
if "-d" in options:
options["--default"] = options["-d"]
- if not load_profile and "--default" in options:
+ if not load_profile and "--default" in options and ("-c" in options or "--change" in options):
load_profile = options["--default"]
if load_profile: