| 1 | .TH xscsize 1 "15 November 1998" "Edgeware tools" |
| 2 | .SH NAME |
| 3 | xscsize \- return size of an X display to a shell script |
| 4 | .SH SYNOPSIS |
| 5 | .B xscsize |
| 6 | .RB [ \-bcx ] |
| 7 | .RB [ \-d |
| 8 | .IR display ] |
| 9 | .SH DESCRIPTION |
| 10 | The |
| 11 | .B xscsize |
| 12 | program interrogates an X display and writes the size of the root |
| 13 | window to standard output in the form of a shell variable assignment |
| 14 | statement. The dimensions are returned in the |
| 15 | .B XWIDTH |
| 16 | and |
| 17 | .B XHEIGHT |
| 18 | variables. |
| 19 | .PP |
| 20 | Command line options can be used to force output in either Bourne or C |
| 21 | shell syntax. In the absence of any explicit instructions, |
| 22 | .B xscsize |
| 23 | looks at the |
| 24 | .B SHELL |
| 25 | environment variable to help make its mind up. |
| 26 | .PP |
| 27 | Typical use would be something like |
| 28 | .RS 5 |
| 29 | .ft B |
| 30 | .nf |
| 31 | eval `xscsize` |
| 32 | .ft R |
| 33 | .fi |
| 34 | .SS OPTIONS |
| 35 | .TP 5 |
| 36 | .BI "\-d, \-\-display " display |
| 37 | Choose which display to connect to. |
| 38 | .TP 5 |
| 39 | .B \-b, --bourne-shell |
| 40 | Output the assignments in Bourne shell syntax (usable by Bourne, |
| 41 | POSIX, Korn, Z and Bourne Again shells). |
| 42 | .TP 5 |
| 43 | .B \-c, --c-shell |
| 44 | Output the assignments in C shell syntax (usable by C and Terminal C |
| 45 | shells). |
| 46 | .TP 5 |
| 47 | .B \-x, --export |
| 48 | Output a variable export command, so that the screen size is inherited |
| 49 | by child processes. The default is to just set local shell variables. |
| 50 | .SH ENVIRONMENT |
| 51 | .TP |
| 52 | .B XWIDTH |
| 53 | Set to the width of the display in pixels. |
| 54 | .B XHEIGHT |
| 55 | Set to the height of the display in pixels. |
| 56 | .B SHELL |
| 57 | Used to decide the nature of the calling shell. If absent, a Bourne |
| 58 | shell is assumed. |
| 59 | .SH AUTHOR |
| 60 | Mark Wooding (mdw@nsict.org). |
| 61 | .SH BUGS |
| 62 | Hopefully none. |