* Timo Kaufmann
* Tomasz Bogdal
* Victor Häggqvist
+* Jan-Oliver Kaiser
## Installation/removal
## Changelog
+**autorandr 1.7**
+
+* *2018-09-25* Fix FB size computation with rotated screens (by @Janno, #117)
+
+**autorandr 1.6**
+
* *2018-04-19* Bugfix: Do not load default profile unless --change is set
* *2018-04-30* Added a `AUTORANDR_MONITORS` variable to hooks (by @bricewge, #106)
* *2018-06-29* Fix detection of current configuration if extra monitors are active
* *2018-07-11* Bugfix in the latest change: Correctly handle "off" minitors when comparing
+* *2018-07-19* Do not kill spawned user processes from systemd unit
+* *2018-07-20* Correctly handle "off" monitors when comparing -- fixup for another bug.
**autorandr 1.5**
else:
import configparser
-__version__ = "1.5"
+__version__ = "1.7"
try:
input = raw_input
x = (a * o_width + b * o_height + c) / w
y = (d * o_width + e * o_height + f) / w
o_width, o_height = x, y
+ if "rotate" in output.options:
+ if output.options["rotate"] in ("left", "right"):
+ o_width, o_height = o_height, o_width
if "pos" in output.options:
o_left, o_top = map(int, output.options["pos"].split("x"))
o_width += o_left
return False
for output in source_configuration.keys():
if "off" in source_configuration[output].options:
- if output in target_configuration and "off" not in target_configuration.options:
+ if output in target_configuration and "off" not in target_configuration[output].options:
return False
else:
if output not in target_configuration:
X11_displays_done.add(display)
+def enabled_monitors(config):
+ monitors = []
+ for monitor in config:
+ if "--off" in config[monitor].option_vector:
+ continue
+ monitors.append(monitor)
+ return monitors
+
+
def read_config(options, directory):
"""Parse a configuration config.ini from directory and merge it into
the options dictionary"""
exec_scripts(profile_folder, "postsave", {
"CURRENT_PROFILE": options["--save"],
"PROFILE_FOLDER": profile_folder,
- "MONITORS": ":".join(config.keys()),
+ "MONITORS": ":".join(enabled_monitors(config)),
})
except Exception as e:
raise AutorandrException("Failed to save current configuration as profile '%s'" % (options["--save"],), e)
script_metadata = {
"CURRENT_PROFILE": load_profile,
"PROFILE_FOLDER": scripts_path,
- "MONITORS": ":".join(load_config.keys()),
+ "MONITORS": ":".join(enabled_monitors(load_config)),
}
exec_scripts(scripts_path, "preswitch", script_metadata)
if "--debug" in options:
%endif
Name: autorandr
-Version: 1.5.1
+Version: 1.5
Release: 1%{?dist}
Summary: Automatically select a display configuration based on connected devices
License: GPL
-#URL: https://github.com/phillipberndt/autorandr
-#Source0: https://github.com/phillipberndt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
-URL: https://github.com/maciex/autorandr
-Source0: https://github.com/maciex/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
+URL: https://github.com/phillipberndt/autorandr
+Source0: https://github.com/phillipberndt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
Requires: python2