I am able to enable or disable my LVDS display using
xrandr --output LVDS --auto
xrandr --output LVDS --off
respectively, but how can I programmatically determine whether the display is enabled?
xrandr -q
shows LVDS as connected regardless of enabled/disabled state.
Best Answer
following the comment of @derobert:
VGA-0 off:
VGA-0 on:
so, you could check the return value of this quiet
grep
to see if it is actually enabled (you can of course reduce it to a more general regex)or, for your output (taken from comment above):