.TH xgetline 1 "15 November 1998" "Edgeware tools" .SH NAME xgetline \- request a line of text in an X dialogue box .SH SYNOPSIS .B xgetline .RB [ -i ] .RB [ \-t .IR title ] .RB [ \-p .IR prompt ] .RB [ \-d .IR default ] .SH DESCRIPTION The .B xgetline program reads a line of text from the user via a pretty GTK dialogue box. The title bar contents, prompt string, and default text are all configurable. If the user enters a string and clicks the .B OK button (or presses .IR enter ), the string is echoed to standard output and .B xgetline returns an exit status of zero. If the user cancels the dialogue box (by closing it, or pressing .IR escape ), .B xgetline echoes nothing and returns an exit status of one. .PP The .B xgetline program is intended to be used in window manager configuration files, to allow users to fill in bits of text (e.g., hostnames or shell commands) in generally useful places. For example, the author has the following shell command attached to a hotkey: .PP .RS 5 .ft B .nf cmd=`xgetline -t "Shell command in window" -p "Command:"` && xterm -T "$cmd" -e sh -c "$cmd" .ft R .fi .SS OPTIONS .TP 5 .B \-i, \-\-invisible Don't echo characters to the screen when they're typed. Useful when requesting passwords and similar secrets. .TP 5 .BI "\-t, \-\-title " title Sets the title of the dialogue box to .IR title . The default title is .RB ` "Input request" '. .TP 5 .BI "\-p, \-\-prompt " prompt Sets the prompt string in the dialogue box to .IR prompt . The default is to have no prompt string. .TP 5 .BI "\-d, \-\-default " default Sets the default text in the entry field to .IR default . The default default is the empty string. .SH AUTHOR Mark Wooding (mdw@nsict.org). .SH BUGS Hopefully none.