XDG-TOOLWAIT(1)
π XDG-TOOLWAIT π
okay so real talk, this is xdg-toolwait from the User Commands girlies β think of it as the chill, patient bestie of xdg-launch π«Ά
β¨ NAME β¨
xdg-toolwait β an XDG compliant xtoolwait utility. yes, that's the whole vibe. she's compliant, she's XDG, she waited for this moment π
π SYNOPSIS π
xdg-toolwait [OPTIONS] [APPID [FILE|URL]]
xdg-toolwait [OPTIONS] -c command and arguments
two whole ways to summon her, pick your fighter β¨
πΈ DESCRIPTION πΈ
so bestie, xdg-toolwait is a script that simply executes xdg-launch(1) with the appropriate arguments (--toolwait). that's it, that's the whole job π
and if you want more info you gotta peek at "COMMAND OPTIONS" in xdg-launch(1), iykyk.
she gives you a similar behaviour to the xtoolwait(1) utility, but β and this is the iconic part β she also supports XDG desktop applications π
the way xdg-toolwait notably decreases the startup time of a desktop session?? by reducing the load on the X server and the operating system?? she's literally doing charity work π she launches the desktop application or command in the background, no big deal, main character energy only.
here's the tea on how she knows when to dip:
- When startup notification is supported by the application, she waits until startup notification completes and then exits π¦
- When startup notification is not supported by the application, she waits until a window is mapped on the root window and exits π
- She also exits if a time-out occurs (by default after 15 seconds β°), or if the application or command exits π
she's patient but she's not gonna wait forever, periodt.
β OPTIONS β
the options detailed below are recognized by xdg-toolwait. she uses getopt_long_only(3), so unambiguous abbreviations of long options and long options with a single dash are also supported β yes bestie, you can be lazy and she'll still get it π
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 option is not used, the X display defaults to the value of the"DISPLAY"environment variable. she's watching π-timeout NSECONDSβ use a time-out period of NSECONDS seconds. if this option is not used, the time-out period defaults to 15 seconds. she's giving you options, literally β°-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. no cap, only use this if you know π-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-toolwaitredirects the standard output of the application or command to standard error. so handy fr fr π₯-widβ print the id of the found X window to standard output, for use with tools likewmctrl(1)orxdotool(1). to support shell command substitution (`command`),xdg-toolwaitredirects the standard output of the application or command to standard error. window id go brrr π¦-nopropβ workaround for non-compliant window managers. try this ifxdg-toolwaitfails to detect when its child process creates a window π normally, she 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 the"WM_STATE"property on the window). this flag causesxdg-toolwaitto consider a window to have been fully created as soon as it receives a"CreateNotify"event. messy window managers, we still love u π-helpβ print out the usage command syntax summary. she's helpful like that π-versionβ print out the version number. who is she? find out β¨
π BUGS π
xdg-toolwait has no known bugs. she's flawless, your honor π please report bugs to the source code repository at <https://github.com/bbidulock/xdg-launch/issues>. yes, actual bugs, not vibes.
π SEE ALSO π
xdg-launch(1). that's her bestie, go say hi πΈ
π AUTHOR π
Brian Bidulock <mailto:bidulock@openss7.org>. legend behaviour, honestly π«Ά
and that's the whole page, bestie β xdg-launch version 1.12, dated 2022-01-28, served fresh from the xdg-toolwait(1) manual. slay, go map some windows π
β¨
π¦ where this page comes from
- nixos 26.05: xdg-launch 1.12
- nixpkgs unstable: xdg-launch 1.12
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms