Skip to content

Commit 68dcebf

Browse files
committed
Assume xrandr is in the PATH
1 parent df8f6a7 commit 68dcebf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

randrctl/xrandr.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ class Xrandr:
3535
MODE_REGEX = re.compile("(\d+x\d+)\+(\d+\+\d+)")
3636
CURRENT_MODE_REGEX = re.compile("\s*(\S+)\s+([0-9\.]+)(.*$)")
3737

38-
def __init__(self, display: Optional[str], xauthority: Optional[str], executable: str = "/usr/bin/xrandr"):
39-
self.executable = executable
38+
def __init__(self, display: Optional[str], xauthority: Optional[str]):
4039
env = dict(os.environ)
4140
if display:
4241
env[DISPLAY] = display
@@ -61,7 +60,7 @@ def _xrandr(self, *args):
6160
"""
6261
args = list(args)
6362
logger.debug("Calling xrandr with args %s", args)
64-
args.insert(0, self.executable)
63+
args.insert(0, "xrandr")
6564

6665
p = subprocess.run(args, capture_output=True, shell=False, env=self.env)
6766
err = p.stderr

0 commit comments

Comments
 (0)