xdg-toolwait - an XDG compliant xtoolwait utility
xdg-toolwait [OPTIONS] [APPID [FILE|URL]]
xdg-toolwait [OPTIONS] -c command and arguments
xdg-toolwait is a script that simply executes xdg-launch(1) with the appropriate arguments (--toolwait). See "COMMAND OPTIONS" in xdg-launch(1) for more information.
It provides a similar behaviour to the xtoolwait(1) utility, but also supports XDG desktop applications.
xdg-toolwait notably decreases the startup time of a desktop session by reducing the load on the X server and the operating system. xdg-toolwait launches the desktop application or command in the background.
When startup notification is supported by the application, it waits until startup notification completes and exits. When startup notification is not supported by the application, it waits until a window is mapped on the root window and exits. xdg-toolwait also exits if a time-out occurs (by default after 15 seconds), or if the application or command exits.
The options that are detailed below are recognized by xdg-toolwait. xdg-toolwait uses getopt_long_only(3), so unambiguous abbreviations of long options and long options with a single dash are also supported.
All options supported by xdg-launch(1) are supported; however, the options also supported by xtoolwait(1) are of interest here. See xdg-launch(1) for full documentation of other options.
- -display DISPLAY
-
Monitor the X display, DISPLAY, for window mapping events. If this optiopn is not used, the X display defaults to the value of the
DISPLAY
environment variable. - -timeout NSECONDS
-
Use a time-out period of NSECONDS seconds. If this option is not used, the time-out period defaults to 15 seconds.
- -mappings NWINDOWS
-
Exit after NWINDOWS windows have been mapped, instead of the default of one window. Use this option only if you are absolutely sure that the application or command will map NWINDOWS top-level windows, in which case it will slightly increase the performance.
- -withdrawn
-
Consider windows in the
WithdrawnState
as mapped. This causes the expected behaviour when starting Window Maker dockapps. - -pid
-
Print the process id (pid) of the application or command to standard output. This option is useful for shell scripts that want to wait for (or send a signal to) the application or command. To support shell command substitution (`command`), xdg-toolwait redirects the standard output of the application or command to standard error.
- -wid
-
Print the id of the found X window to standard output, for use with tools like wmctrl(1) or xdotool(1). To support shell command substitution (`command`), xdg-toolwait redirects the standard output of the application or command to standard error.
- -noprop
-
Workaround for non-compliant window managers. Try this if xdg-toolwait fails to detect when its child process creates a window. Normally, xdg-toolwait waits for the window manager to send at least one
PropertyNotify
event for each new window so that it doesn't react until the window has been mapped and positioned (at which an ICCCM 2.0 compliant window manager usually sets theWM_STATE
property on the window). This flag causes xdg-toolwait to consider a window to have been fully created as soon as it receives aCreateNotify
event. - -help
-
Print out the usage command syntax summary.
- -version
-
Print out the version number.
xdg-toolwait has no known bugs. Please report bugs to the source code repository at https://github.com/bbidulock/xdg-launch/issues.
Brian Bidulock mailto:[email protected]