Change build structure a bit: put common code in a library.
[xtoys] / xgetline.1
CommitLineData
90b2c5d4 1.TH xgetline 1 "15 November 1998" "Edgeware tools"
2.SH NAME
3xgetline \- request a line of text in an X dialogue box
4.SH SYNOPSIS
5.B xgetline
6.RB [ \-t
7.IR title ]
8.RB [ \-p
9.IR prompt ]
10.RB [ \-d
11.IR default ]
12.SH DESCRIPTION
13The
14.B xgetline
15program reads a line of text from the user via a pretty GTK dialogue
16box. The title bar contents, prompt string, and default text are all
17configurable. If the user enters a string and clicks the
18.B OK
19button (or
20presses
21.IR enter ),
22the string is echoed to standard output and
23.B xgetline
24returns an exit status of zero. If the user cancels the dialogue box
25(by closing it, or pressing
26.IR escape ),
27.B xgetline
28echoes nothing and returns an exit status of one.
29.PP
30The
31.B xgetline
32program is intended to be used in window manager configuration files, to
33allow users to fill in bits of text (e.g., hostnames or shell commands)
34in generally useful places. For example, the author has the following
35shell command attached to a hotkey:
36.PP
37.RS 5
38.ft B
39.nf
40cmd=`xgetline -t "Shell command in window" -p "Command:"` &&
41 xterm -T "$cmd" -e sh -c "$cmd"
42.ft R
43.fi
44.SS OPTIONS
45.TP 5
46.BI "\-t, \-\-title " title
47Sets the title of the dialogue box to
48.IR title .
49The default title is
50.RB ` "Input request" '.
51.TP 5
52.BI "\-p, \-\-prompt " prompt
53Sets the prompt string in the dialogue box to
54.IR prompt .
55The default is to have no prompt string.
56.TP 5
57.BI "\-d, \-\-default " default
58Sets the default text in the entry field to
59.IR default .
60The default default is the empty string.
61.SH AUTHOR
62Mark Wooding (mdw@nsict.org).
63.SH BUGS
64Hopefully none.