Skip to content

Don't set --fb when disabling outputs#219

Open
rossabaker wants to merge 1 commit into
phillipberndt:masterfrom
rossabaker:issue-198
Open

Don't set --fb when disabling outputs#219
rossabaker wants to merge 1 commit into
phillipberndt:masterfrom
rossabaker:issue-198

Conversation

@rossabaker

Copy link
Copy Markdown

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 the disable_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!

rossabaker added a commit to rossabaker/cromulent that referenced this pull request Jul 30, 2020

@phillipberndt phillipberndt left a comment

Copy link
Copy Markdown
Owner

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..)

Comment thread autorandr.py
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

Copy link
Copy Markdown
Owner

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!

Copy link
Copy Markdown
Author

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.

@rossabaker rossabaker left a comment

Copy link
Copy Markdown
Author

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.

Comment thread autorandr.py
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

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants