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