I want to find a simple way to find the resolution of every monitor my computer is connected to.
For example, the primary monitor on my laptop is LVDS-1
. I know the resolution is 1366x768
because of the following command:
$ xrandr | grep "LVDS-1"
LVDS-1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 277mm x 156mm
Presumably, I could use the --listactivemonitors
option to xrandr
to retrieve this resolution. The output of this command is:
$ xrandr --listactivemonitors
Monitors: 1
0: +*LVDS-1 1366/277x768/156+0+0 LVDS-1
My questions are:
- What do the numbers
/277
and/156
mean in this output? - Is there a simple command like
mycommand LVDS-1
that will just return1366x768
?
xrandr
is not the right tool, here are some good answers: askubuntu.com/questions/584688/…