X-Git-Url: https://git.distorted.org.uk/~mdw/xtoys/blobdiff_plain/f6795c17f9899da2759a2f5782e17b2ee5a0dbb9..4be8cb2b59106a6c55a235f713cc4ac2ba655df8:/xscsize.1 diff --git a/xscsize.1 b/xscsize.1 index 764b542..c06ea8e 100644 --- a/xscsize.1 +++ b/xscsize.1 @@ -4,7 +4,7 @@ xscsize \- return size of an X display to a shell script .SH SYNOPSIS .B xscsize -.RB [ \-bcx ] +.RB [ \-bcmx ] .RB [ \-d .IR display ] .SH DESCRIPTION @@ -18,6 +18,13 @@ and .B XHEIGHT variables. .PP +With the +.B \-m +option (see below), +.B xscsize +instead reports the geometry of the individual monitors (CRTCs) of a +(possibly) multihead display. +.PP Command line options can be used to force output in either Bourne or C shell syntax. In the absence of any explicit instructions, .B xscsize @@ -45,15 +52,99 @@ POSIX, Korn, Z and Bourne Again shells). Output the assignments in C shell syntax (usable by C and Terminal C shells). .TP 5 +.B \-m, \-\-multiscreen +Output geometry information about the individual monitors of a +(possibly) multihead display, rather than the overall size of the root +window. This sets +.B XNSCR +to the number of monitors, and +.BI XSCR n _X \fR, +.BI XSCR n _Y \fR, +.BI XSCR n _WIDTH \fR, +and +.BI XSCR n _HEIGHT \fR +to the +.IR x - +and +.IR y -coordinates +of the pixel shown in the top-left of monitor +.I n +(starting from zero), and the width and height of monitor +.I n +in pixels. The monitors will be sorted in order of increasing +.IR y -coordinate +(i.e., top to bottom), with monitors with equal +.IR y -coordinates +sorted in order of increasing +.IR x -coordinate +(i.e., left to right). Usually, then, the first monitor will be at +(0, 0). +.IP +This requires that support libraries for the X RANDR extension were +available when +.B xscsize +was compiled, and that the display actually implements at least version +1.2 of the RANDR extension. If not, +.B xscsize +will still accept the +.B \-m +option, and produce appropriately formatted output, but will assume that +there is exactly one monitor, and that it shows the entire root window. +.TP 5 .B \-x, --export Output a variable export command, so that the screen size is inherited by child processes. The default is to just set local shell variables. .SH ENVIRONMENT .TP .B XWIDTH -Set to the width of the display in pixels. +Set to the width of the display in pixels (not in +.B \-m +mode). +.TP .B XHEIGHT -Set to the height of the display in pixels. +Set to the height of the display in pixels (not in +.B \-m +mode). +.TP +.B XNSCR +The number of monitors attached to the display (only in +.B \-m +mode). +.TP +.BI XSCR n _X +The +.I x -coordinate +of the top-left pixel shown on monitor number +.I n +counting from zero (only in +.B \-m +mode). +.TP +.BI XSCR n _Y +The +.I y -coordinate +of the top-left pixel shown on monitor number +.I n +counting from zero (only in +.B \-m +mode). +.TP +.BI XSCR n _WIDTH +The width, in pixels, of the portion of the root window shown on monitor +number +.I n +counting from zero (only in +.B \-m +mode). +.TP +.BI XSCR n _HEIGHT +The height, in pixels, of the portion of the root window shown on monitor +number +.I n +counting from zero (only in +.B \-m +mode). +.TP .B SHELL Used to decide the nature of the calling shell. If absent, a Bourne shell is assumed.