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