Skip to content
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

Feature: holistic profile comparison #362

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tomeon
Copy link

@tomeon tomeon commented Sep 27, 2023

This PR introduces a more-holistic profile comparison that is based on the following criteria:

  1. The match_asterisk closeness of EDID patterns,
  2. The percent of outputs in the profile that are also available in the current RandR configuration, and
  3. The percent of outputs in the current RandR configuration that are in the profile.

These three criteria are weighted identically. Profiles that have better overall EDID pattern matches and output overlaps with the current RandR configuration are preferred.

Additionally, this PR extends EDID matching to all outputs in a profile, rather than just the last output (where "last" means "final element in profile["config"].keys()").

Motivation: when my laptop is docked, I would like autorandr to automatically select a profile that includes my external monitors. I suspect that I am not alone in this; however, I would be happy to update this PR to gate the new behavior behind a CLI flag if you'd like to default to the current profile-sorting behavior.

Note that both of these are breaking changes, as explained in the corresponding commit messages.

Thanks in advance for your consideration!

based on:

    1. The `match_asterisk` closeness of EDID patterns,
    2. The percent of outputs in the profile that are also available in
       the current RandR configuration, and
    3. The percent of outputs in the current RandR configuration that
       are in the profile.

BREAKING CHANGE: outputs are liable to be included in the detected set
even if they are missing one or more outputs present in the current
RandR configuration.
defined in a given profile.
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.

1 participant