2 .TH xgetline 1 "15 November 1998" "Edgeware tools"
4 xgetline \- request a line of text in an X dialogue box
21 program reads a line of text from the user via a pretty GTK dialogue
22 box. The title bar contents, prompt string, and default text are all
23 configurable. If the user enters a string and clicks the
28 the string is echoed to standard output and
30 returns an exit status of zero. If the user cancels the dialogue box
31 (by closing it, or pressing
34 echoes nothing and returns an exit status of one.
38 program is intended to be used in window manager configuration files, to
39 allow users to fill in bits of text (e.g., hostnames or shell commands)
40 in generally useful places. For example, the author has the following
41 shell command attached to a hotkey:
46 cmd=`xgetline -t "Shell command in window" -p "Command:"` &&
47 xterm -T "$cmd" -e sh -c "$cmd"
53 Don't echo characters to the screen when they're typed. Useful when
54 requesting passwords and similar secrets.
56 .BI "\-t, \-\-title " title
57 Sets the title of the dialogue box to
60 .RB ` "Input request" '.
62 .BI "\-p, \-\-prompt " prompt
63 Sets the prompt string in the dialogue box to
65 The default is to have no prompt string.
67 .BI "\-d, \-\-default " default
68 Sets the default text in the entry field to
70 The default default is the first item in the empty string. The special
73 sets the default to be the first item in the history list, if one is
76 .BI "\-l, \-\-list " file
77 Reads a list of alternatives from
79 and displays them in a drop-down list box. The user can rapidly select
80 an item from the drop-down list using the mouse or cursor keys. The
81 file is not modified (but see the
85 .B "\-n, \-\-no-choice"
86 One of the items from the selection list must be chosen; the user may
87 not type an entry in directly.
89 .BI "\-H, \-\-history " file
90 Reads a file and displays the contents in a drop-down list, as for
92 above. Once the user has entered a string, a new list written to
94 containing the newly entered string as the first item; other lines
95 matching the newly entered string are not written.
97 .BI "\-m, \-\-histmax " max
98 When writing an updated history file, do not write more than
100 lines. The default is 20; a value of 0 disables a length limit on the
103 Mark Wooding (mdw@nsict.org).