Support GNU-style long options throughout, and introduce proper help
[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
f3b35b6b 36.BI "\-d, \-\-display " display
37Choose which display to connect to.
38.TP 5
39.B \-b, --bourne-shell
90b2c5d4 40Output the assignments in Bourne shell syntax (usable by Bourne,
41POSIX, Korn, Z and Bourne Again shells).
42.TP 5
f3b35b6b 43.B \-c, --c-shell
90b2c5d4 44Output the assignments in C shell syntax (usable by C and Terminal C
45shells).
46.TP 5
f3b35b6b 47.B \-x, --export
90b2c5d4 48Output a variable export command, so that the screen size is inherited
49by child processes. The default is to just set local shell variables.
50.SH ENVIRONMENT
51.TP
52.B XWIDTH
53Set to the width of the display in pixels.
54.B XHEIGHT
55Set to the height of the display in pixels.
56.B SHELL
57Used to decide the nature of the calling shell. If absent, a Bourne
58shell is assumed.
59.SH AUTHOR
60Mark Wooding (mdw@nsict.org).
61.SH BUGS
62Hopefully none.