Mathematica, 51 bytes
SystemInformation[][[1,5,2,1,2,1,2,2,;;,2]]~Infix~x
This may not work for you depending on what devices you have connected (I don't know). This should always work (assuming you have at least one screen hooked up):
Infix[Last/@("FullScreenArea"/.SystemInformation["Devices","ScreenInformation"][[1]]),x]
Explanation
SystemInformation[]
returns an expression of the form
SystemInformationData[{
"Kernel" -> {__},
"FrontEnd" -> {__},
"Links" -> {__},
"Parallel" -> {__},
"Devices" -> {__},
"Network" -> {__},
}]
We are interested in "Devices"
, which can be accessed directly as SystemInformation["Devices"]
or as SystemInformation[][[1,5,2]]
. The result will be a list of the form
{
"ScreenInformation" -> {__},
"GraphicsDevices" -> {__},
"ControllerDevices" -> {__}
}
We want "ScreenInformation"
, which can be accessed either as SystemInformation["Devices","ScreenInformation"]
or more succinctly as SystemInformation[][[1,5,2,1,2]]
. The result will be of the form
{
{
"ScreenArea" -> {__},
"FullScreenArea" -> {{0,w_},{0,h_}},
"BitDepth" -> _,
"Resolution" -> _
},
___
}
The length of the list will be the number of screens you have connected. The first screen is SystemInformation[][[1,5,2,1,2,1]]
and the width and height can be extracted as SystemInformation[][[1,5,2,1,2,1,2,2,;;,2]]
Then we just insert an Infix
x
for the output format.
'0x0'
\$\endgroup\$