File: gxmessage.1

package info (click to toggle)
gxmessage 3.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,232 kB
  • sloc: sh: 1,565; ansic: 819; makefile: 46
file content (295 lines) | stat: -rw-r--r-- 7,550 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
.TH "GXMESSAGE" "1" "May 25th, 2015" "" ""
.\"
.\"
.\"
.de EX        \" begin example
.ne 5
.if n .sp 1
.if t .sp .5
.nf
.in +.5i
..
.de EE        \" end example
.fi
.in -.5i
.if n .sp 1
.if t .sp .5
..
.\"
.\"
.\"
.SH "NAME"
gxmessage - a GTK-based xmessage clone
.\"
.\"
.\"
.SH "SYNOPSIS"
\fBgxmessage\fR [\fIOPTIONS\fR] \fBmessage\fR ...
.br
\fBgxmessage\fR [\fIOPTIONS\fR] -file \fIFILENAME\fR
.\"
.\"
.\"
.SH "DESCRIPTION"
.PP 
\fBgxmessage\fR opens a window to display a message obtained from the command
line, from a file, or from \fIstdin\fR. The window includes a row of buttons,
each of which causes the program to exit with a different return code.
.PP
The GNU Info entry for gxmessage contains detailed information and examples.
.\"
.\"
.\"
.SH "OPTIONS"
.PP
\fBgxmessage\fR accepts any option \fBxmessage\fR would, although some
(such as \fB-bw\fR and \fB-xrm\fR) are silently ignored.
.TP
\fB-bg\fR \fICOLOR\fR
.br
Sets the background color of the message to \fICOLOR\fR. Examples: red,
"#c90", "#446a7e".
.TP
\fB-buttons\fR \fIBUTTON_LIST\fR
.br
Defines the buttons to be created. \fIBUTTON_LIST\fR is a comma-separated list
of \fILABEL\fR\fB:\fR\fIVALUE\fR pairs, one for each button. The \fILABEL\fR is
the text that appears on the button. The \fIVALUE\fR (0..255) is the code the
program will exit with if that button is pressed. Commas and colons can be
escaped using backslashes (\\). As well as ordinary text, the \fILABEL\fR can
specify a GTK "stock" button, like "GTK_STOCK_CANCEL", or it can include an
underscore (_) to specify a keyboard accelerator. If \fIVALUE\fRs are omitted,
they default to 101, 102, 103, etc., in order. If no \fB-buttons\fR option is
given, \fIBUTTON_LIST\fR defaults to \fB"okay:0"\fR.
.EX
gxmessage -buttons "Foo:42,Bar:63" "Example"
echo $?

gxmessage -buttons "_Foo,_Bar" "Example"
echo $?

gxmessage "Example"
echo $?

gxmessage -buttons "GTK_STOCK_OK:0" "Example"
echo $?

gxmessage -buttons "Hello\\, world" "Example"
.EE
.TP
\fB-center\fR
.br
Opens the \fBgxmessage\fR window in the middle of the screen.
.TP
\fB-default\fR \fILABEL\fR
.br
Opens the \fBgxmessage\fR window with input focused on the specified button.
\fILABEL\fR is one of the \fILABEL\fRs in \fIBUTTON_LIST\fR (see
\fB-buttons\fR, above).
.TP
\fB-display\fR \fIDISPLAY\fR
.br
Specifies the X display to use.
.TP
\fB-fg\fR \fICOLOR\fR
.br
Sets the message text color to \fICOLOR\fR.
.TP
\fB-file\fR \fIFILENAME\fR
.br
Causes the named file to be used as the message source. If a dash (-) is used
in place of \fIFILENAME\fR, the message will be read from \fIstdin\fR.
.TP
\fB-fn\fR | \fB-font\fR \fIFONT\fR
.br
Specifies the message font, using GTK's font specification system. For
example, \fB-font "serif italic 14"\fR. (GTK's font system is not compatible
with \fBxmessage\fR. See the Compatibility section, below, for a workaround.)
.TP
\fB-geometry\fR \fIGEOMETRY\fR
.br
Sets the window's size and/or position. Examples:
.EX
-geometry 400x200
-geometry 400x200+600+100
-geometry +600+100
.EE
.TP
\fB-help\fR
.br
Displays basic usage information then exits.
.TP
\fB-iconic\fR
.br
Opens the \fBgxmessage\fR window in its iconized (minimized) state.
.TP
\fB-name\fR \fINAME\fR
.br
Sets the \fBgxmessage\fR window's name to \fINAME\fR.
.TP
\fB-nearmouse\fR
.br
Opens the \fBgxmessage\fR window near the mouse pointer.
.TP
\fB-print\fR
.br
Writes the \fILABEL\fR of the selected button to \fIstdout\fR.
.TP
\fB-timeout\fR \fISECONDS\fR
.br
Automatically closes the \fBgxmessage\fR window with an exit code of 0 if no
button is pressed within \fISECONDS\fR seconds. (The \fB-entry\fR and
\fB-entrytext\fR options cause \fB-timeout\fR to be ignored.)
.TP
\fB-title\fR \fITITLE\fR
.br
Sets the \fBgxmessage\fR window's title to \fITITLE\fR.
.\"
.\"
.\"
.SH "GXMESSAGE SPECIFIC OPTIONS"
.PP
The following options are specific to \fBgxmessage\fR and are not compatible
with \fBxmessage\fR.
.TP
\fB-borderless\fR
.br
Opens the \fBgxmessage\fR window without the usual window frame.
.TP
\fB-encoding\fR \fICHARSET\fR
.br
Specifies the encoding of the message text. By default, the message text is
assumed to match the encoding of the current locale.
.TP
\fB-entry\fR
.br
Adds a text entry box to the \fBgxmessage\fR window. When the window closes,
any text in the entry box will be copied to \fIstdout\fR. This option
can't be used at the same time as the \fB-print\fR option.
.TP
\fB-entrytext\fR \fITEXT\fR
.br
Same as \fB-entry\fR, but sets the default entry box contents to \fITEXT\fR.
.TP
\fB-noescape\fR
.br
Prevents the window closing if the ESC key is pressed. This option only works
if a file named /usr/share/gxmessage/allow_noescape exists.
.TP
\fB-nofocus\fR
.br
Prevents the \fBgxmessage\fR window from receiving focus when it opens.
.TP
\fB-ontop\fR
.br
Attempts to keep the \fBgxmessage\fR window in front of other windows.
.TP
\fB-sticky\fR
.br
Causes the \fBgxmessage\fR window to appear on all workspaces.
.TP
\fB-version\fR
.br
Displays the program's version number and Copyright details, then exits.
.TP
\fB-wrap\fR
.br
Causes lines to wrap rather than exceed the width of the window.
.\"
.\"
.\"
.SH "GTK DEFAULTS"
.PP
The program's default appearance can be adjusted using GTK resource files.
The main text display widget is named \fBgxmessage-textview\fR.
The text entry widget is named \fBgxmessage-entry\fR.
.EX
# Example: ~/.gtkrc-2.0

style "gxmsg" {
    text[NORMAL]   = "#cc9900"
    base[NORMAL]   = "#660000"
    text[SELECTED] = "#660000"
    base[SELECTED] = "#cc9900"
    font_name      = "monospace"
}
widget "*.gxmessage-textview" style  "gxmsg"
widget "*.gxmessage-entry"    style  "gxmsg"
.EE
.\"
.\"
.\"
.SH "EXIT STATUS"
.PP
If a button is pressed, the program returns the value assigned to that button.
The default "okay" button returns 0.
.PP
If a timeout event occurs, the program returns 0.
.PP
If an error occurs, or if the window is closed without a button-press or
timeout event, the program exits with code 1. Pressing the ESC key also causes
the program to exit with code 1.
.\"
.\"
.\"
.SH "COMPATIBILITY WITH XMESSAGE"
.PP
Fall back to \fBxmessage\fR if \fBgxmessage\fR isn't available:
.EX
#! /bin/sh
XMESSAGE=$(which gxmessage) || XMESSAGE=xmessage
$XMESSAGE "hello, world"
.EE
.PP
If you specify fonts, check which program you're using:
.EX
font="monospace 14"
[ "$XMESSAGE" = xmessage ] && font="fixed"
$XMESSAGE ${font:+-fn "$font"} "hello, world"
.EE
.PP
Don't use double-dashed command line options:
.EX
$XMESSAGE "hello, world" -buttons good
$XMESSAGE "hello, world" \-\-buttons bad
.EE
.PP
Don't use the \fBgxmessage\fR-specific options:
.EX
\fB-entry\fR, \fB-entrytext\fR, \fB-borderless\fR, \fB-wrap\fR,
\fB-encoding\fR, \fB-nofocus\fR, \fB-noescape\fR, \fB-ontop\fR,
\fB-sticky\fR, \fB-version\fR, \fB-h\fR, \fB-?\fR
.EE
.\"
.\"
.\"
.SH "BUGS"
.PP
For some reason, opening the gxmessage window with no button set to be the
default causes GTK to emit a "beep" sound.
.PP
If you discover other bugs in the most recent version of \fBgxmessage\fR,
please get in touch.
.\"
.\"
.\"
.SH "SEE ALSO"
.PP
\fIxmessage\fR(1), \fIzenity\fR(1), \fIdialog\fR(1)
.PP
The GNU Info entry for gxmessage contains detailed information and examples.
.\"
.\"
.\"
.SH "AUTHORS"
.PP
Timothy Musson <trmusson@gmail.com>
.\"
.\"
.\"
.SH "COPYRIGHT NOTICE"
Copyright \(co 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012, 2015 Timothy Richard Musson
.PP
Copying and distribution of this file, with or without modification, are
permitted provided the copyright notice and this notice are preserved.