Don't set --fb when disabling outputs#219
Open
rossabaker wants to merge 1 commit into
Open
Conversation
rossabaker
added a commit
to rossabaker/cromulent
that referenced
this pull request
Jul 30, 2020
phillipberndt
left a comment
Owner
There was a problem hiding this comment.
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..)
| 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 |
Owner
There was a problem hiding this comment.
This creates a reference to base_argv. The += below changes base_argv itself!
Author
There was a problem hiding this comment.
Oops! Yes. I'm out of practice in mutable collections.
rossabaker
commented
Sep 1, 2020
rossabaker
left a comment
Author
There was a problem hiding this comment.
Okay, I'll give the other approach a try when I clean up my base_argv bug.
| 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 |
Author
There was a problem hiding this comment.
Oops! Yes. I'm out of practice in mutable collections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have one monitor that's bigger than my laptop's. When I undock, the
--fbargument for the new configuration prevents the large monitor from shutting off in thedisable_outputspass. 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!