XDG-TOOLWAIT(1)

πŸ“¦ version 1.12, in nixos 26.05, nixpkgs unstable

πŸ’… 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-toolwait redirects 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 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. window id go brrr πŸ¦‹
  • -noprop β€” workaround for non-compliant window managers. try this if xdg-toolwait fails 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 causes xdg-toolwait to 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