diff --git a/powerline/bindings/wm/__init__.py b/powerline/bindings/wm/__init__.py index 6f8be621..0f2cc9d6 100644 --- a/powerline/bindings/wm/__init__.py +++ b/powerline/bindings/wm/__init__.py @@ -24,14 +24,14 @@ def get_i3_connection(): return conn -XRANDR_OUTPUT_RE = re.compile(r'^(?P[0-9A-Za-z-]+) connected (?P\d+)x(?P\d+)\+(?P\d+)\+(?P\d+)', re.MULTILINE) +XRANDR_OUTPUT_RE = re.compile(r'^(?P[0-9A-Za-z-]+) connected(?P primary)? (?P\d+)x(?P\d+)\+(?P\d+)\+(?P\d+)', re.MULTILINE) def get_connected_xrandr_outputs(pl): '''Iterate over xrandr outputs Outputs are represented by a dictionary with ``name``, ``width``, - ``height``, ``x`` and ``y`` keys. + ``height``, ``primary``, ``x`` and ``y`` keys. ''' return (match.groupdict() for match in XRANDR_OUTPUT_RE.finditer( run_cmd(pl, ['xrandr', '-q'])