Skip to content

Conversation

@palfrey
Copy link
Contributor

@palfrey palfrey commented Jul 19, 2025

This PR fixes two things:

  • Adds various typing bits, especially flagging that the args to Xrandr are actually optional
  • Allows setting the xrandr path to something else

Will need #39 merging first to fix 3.7

CURRENT_MODE_REGEX = re.compile("\s*(\S+)\s+([0-9\.]+)(.*$)")

def __init__(self, display: str, xauthority: str):
def __init__(self, display: Optional[str], xauthority: Optional[str], executable: str = "/usr/bin/xrandr"):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about alternatively relying on xrandr being in PATH?

If I were writing this today, I'd definitely go with reliance on PATH

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think actually that would solve most of my problem. I'm using it with just "xrandr" so that'd be fine.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be willing to make the change to use xrandr from the PATH?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@koiuo koiuo merged commit 22997ef into koiuo:master Jul 22, 2025
12 of 35 checks passed
@palfrey palfrey deleted the typing-and-xrandr-path branch July 22, 2025 08:34
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