2 .TH xscsize 1 "15 November 1998" "Straylight/Edgeware" "xtoys"
4 xscsize \- return size of an X display to a shell script
13 program interrogates an X display and writes the size of the root
14 window to standard output in the form of a shell variable assignment
15 statement. The dimensions are returned in the
25 instead reports the geometry of the individual monitors (CRTCs) of a
26 (possibly) multihead display.
28 Command line options can be used to force output in either Bourne or C
29 shell syntax. In the absence of any explicit instructions,
33 environment variable to help make its mind up.
35 Typical use would be something like
44 .BI "\-d, \-\-display " display
45 Choose which display to connect to.
47 .B \-b, --bourne-shell
48 Output the assignments in Bourne shell syntax (usable by Bourne,
49 POSIX, Korn, Z and Bourne Again shells).
52 Output the assignments in C shell syntax (usable by C and Terminal C
55 .B \-m, \-\-multiscreen
56 Output geometry information about the individual monitors of a
57 (possibly) multihead display, rather than the overall size of the root
60 to the number of monitors, and
63 .BI XSCR n _WIDTH \fR,
65 .BI XSCR n _HEIGHT \fR
70 of the pixel shown in the top-left of monitor
72 (starting from zero), and the width and height of monitor
74 in pixels. The monitors will be sorted in order of increasing
76 (i.e., top to bottom), with monitors with equal
78 sorted in order of increasing
80 (i.e., left to right). Usually, then, the first monitor will be at
83 This requires that support libraries for the X RANDR extension were
86 was compiled, and that the display actually implements at least version
87 1.2 of the RANDR extension. If not,
91 option, and produce appropriately formatted output, but will assume that
92 there is exactly one monitor, and that it shows the entire root window.
95 Output a variable export command, so that the screen size is inherited
96 by child processes. The default is to just set local shell variables.
100 Set to the width of the display in pixels (not in
105 Set to the height of the display in pixels (not in
110 The number of monitors attached to the display (only in
117 of the top-left pixel shown on monitor number
119 counting from zero (only in
126 of the top-left pixel shown on monitor number
128 counting from zero (only in
133 The width, in pixels, of the portion of the root window shown on monitor
136 counting from zero (only in
141 The height, in pixels, of the portion of the root window shown on monitor
144 counting from zero (only in
149 Used to decide the nature of the calling shell. If absent, a Bourne
154 Mark Wooding (mdw@distorted.org.uk).