-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call xrandr individually for each display #163
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -780,8 +780,8 @@ def apply_configuration(new_configuration, current_configuration, dry_run=False) | |
|
||
# Enable the remaining outputs in pairs of two operations | ||
operations = disable_outputs + enable_outputs | ||
for index in range(0, len(operations), 2): | ||
argv = base_argv + list(chain.from_iterable(operations[index:index + 2])) | ||
for op in operations: | ||
argv = base_argv + list(op) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Going one by one is an issue if there's still an output to disable, because then the first call would disable the last output. You'll have to add code like
and then handles the remaining ones one by one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand what you're saying, but I don't see the problem. XRandR works fine if there's not a single output active. So even if all outputs get disabled, the fact that there are calls queued that will enable them again, should make this a safe operation, no? |
||
if call_and_retry(argv, dry_run=dry_run) != 0: | ||
raise AutorandrException("Command failed: %s" % " ".join(argv)) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the comment