File: xtoolwait.man

package info (click to toggle)
xtoolwait 1.3-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 132 kB
  • ctags: 573
  • sloc: makefile: 706; ansic: 258
file content (110 lines) | stat: -rw-r--r-- 4,141 bytes parent folder | download | duplicates (3)
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
.TH XTOOLWAIT 1 "31 July 99"
.SH NAME
xtoolwait \- start X client and wait for it to map a window
.SH SYNOPSIS
\fBxtoolwait\fP [ -display \fIdisplay-name\fP ] [ -timeout \fInseconds\fP ]
[ -mappings \fInwindows\fP ] [ -withdrawn ] [ -pid ] [ -help ]
[ -version ] \fIcommand\fP
.SH DESCRIPTION
\fBXtoolwait\fP notably decreases the startup time of an X session by reducing
the load on the X server and the OS.
\fBXtoolwait\fP starts the X client \fIcommand\fP in the background. It then
waits until a window is mapped on the root window and exits.
\fBXtoolwait\fP also exits if a time-out occurs (by default after
15 seconds), or if \fIcommand\fP exits.
.SH OPTIONS
.TP
\fB-display \fIdisplay-name\fR
Monitor the X display \fIdisplay-name\fR for window mapping events.
If this option is not used, the X display defaults to the value of
the \fBDISPLAY\fP environment variable.
See also section \fBNOTES\fP below.
.TP
\fB-timeout \fInseconds\fR
Use a time-out period of \fInseconds\fP seconds. If this option is not
used, the time-out period defaults to 15 seconds.
.TP
\fB-mappings \fInwindows\fR
Exit after \fInwindows\fP windows have been mapped, instead of the default of
one window. Use this option only if you are absolutely sure that \fIcommand\fP
will map \fInwindows\fP top-level windows, in which case it will slightly
increase the performance.
.TP
\fB-withdrawn\fP
Consider windows in Withdrawn state as mapped.  This causes the expected
behaviour when starting Window Maker dockapps.
.TP
\fB-pid\fP
Print the process id (pid) of \fIcommand\fP to standard output. This option
is useful for shell scripts that want to wait for (or send a signal to)
\fIcommand\fP. To support shell command substitution (`command`),
\fBXtoolwait\fP redirects the standard output of \fIcommand\fP to standard
error.
.TP
\fB-help\fP
Print out the `Usage:' command syntax summary.
.TP
\fB-version\fP
Print out the version number.
.SH USAGE
This is the relevant part of my own .xinitrc file, showing the
proper use of \fBXtoolwait\fP:
.RS
.sp
.nf
.ne 16
#
# Startup the window manager first
#
olvwm & wmpid=$!
#
# Restore desktop settings
# Do _not_ put xtoolwait in the background
#
xtoolwait -mappings 2 contool -Wp 30 30 -Ws 575 246 -WP 3 533 -Wi
xtoolwait xeyes -geom 77x60+640+107
xtoolwait ansi_xterm -geom 80x24+22+11
xtoolwait clock -Wp 90 90 -Ws 150 150 -WP 733 110 -Wi
#
# Wait for the window manager
#
wait $wmpid
.fi
.sp
.RE
Note that the window manager must be started first. \fBXtoolwait\fP depends
on it to detect window mappings. The first instance of \fBXtoolwait\fP will
wait until both the window manager and the X client have finished
their initialization.
.PP
Note also that the first \fBXtoolwait\fP uses the \fB-mappings\fP option to
detect the virtual desktop window, which is mapped by virtual window
managers. Omit this option if you use a non-virtual window manager.
.SH "EXIT STATUS"
\fBXtoolwait\fP returns 0 if it detected the mapping of a window on the root
window, and 1 otherwise. The one exception to this rule is when \fIcommand\fP
exits normally before mapping a window, in which case its return value is
returned.
.SH ENVIRONMENT
.TP
\fBDISPLAY\fP
The default display name to monitor
.SH "SEE ALSO"
xtoolplaces(1)
.SH NOTES
\fBXtoolwait\fP does not propagate the \fB-display\fP option to \fIcommand\fP.
If you use this option, you should feed it both to \fBXtoolwait\fP and to
\fIcommand\fP. This is intentional, so don't report this as a bug.
.SH AUTHOR
\fBXtoolwait\fP was written by Richard Huveneers <richard@hekkihek.hacom.nl>.
Check out http://www.hacom.nl/~richard for more information about the author.
.SH COPYRIGHT
Copyright (C) 1995-1999  Richard Huveneers <richard@hekkihek.hacom.nl>.
\fBXtoolwait\fP is released under the GNU General Public License.
The full copyright notice is stated at the start of the source code.
.SH BUGS
\fBXtoolwait\fP tries to ignore windows that are mapped by other X clients.
The method used will fail if two or more X clients are started almost
simultaneously.
This situation does not arise as long as all X clients are started by
\fBXtoolwait\fP during the X session startup.