-
Notifications
You must be signed in to change notification settings - Fork 124
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
Don't set --fb when disabling outputs #219
base: master
Are you sure you want to change the base?
Conversation
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.
Does the approach from the ticket work for you as well? I'm referring to the one where the --fb
argument is always passed, just with the old size. It'd feel safer to me to pursue that approach if it works. (There's just so many edge cases with xrandr
..)
@@ -852,7 +852,11 @@ 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])) | |||
argv = base_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.
This creates a reference to base_argv
. The +=
below changes base_argv
itself!
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.
Oops! Yes. I'm out of practice in mutable collections.
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.
Okay, I'll give the other approach a try when I clean up my base_argv bug.
@@ -852,7 +852,11 @@ 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])) | |||
argv = base_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.
Oops! Yes. I'm out of practice in mutable collections.
I have one monitor that's bigger than my laptop's. When I undock, the
--fb
argument for the new configuration prevents the large monitor from shutting off in thedisable_outputs
pass. I think it's the same basic problem as #198.I'm not usually a Python developer, so apologies if this is unpythonic. It works for me.
Thanks for the great tool!