XDO(1)
okay bestie, welcome to the xdo manual page β XDO(1), section 1 of the Xdo Manual π
π NAME π
xdo β perform actions on windows. periodt.
β¨ SYNOPSIS β¨
xdo ACTION [OPTIONS] [WID ...]
that's the whole shape of it, no cap.
πΈ DESCRIPTION πΈ
Apply the given action to the given windows.
If no window IDs and no options are given, the action applies to the focused window. π
π ACTIONS π
okay so these are the moves you can pull, bestie:
closeβ close the window.killβ kill the client.hideβ unmap the window.showβ map the window.raiseβ raise the window.lowerβ lower the window.belowβ put the window below the target (see-t).aboveβ put the window above the target (see-t).moveβ move the window.resizeβ resize the window.activateβ activate the window.idβ print the windowβs ID.pidβ print the windowβs pid.key_press,key_releaseβ simulate a key press/release event.button_press,button_releaseβ simulate a button press/release event.pointer_motionβ simulate a pointer motion event.-hβ print the synopsis and exit.-vβ print the version and exit.
π OPTIONS π
When options are provided, the action applies to all the children of the root window that match the comparisons implied by the options in relation to the focused window. got it? got it. π
-rβ distinct ID.-cβ same class.-Cβ distinct class.-dβ same desktop.-Dβ distinct desktop.-n INSTANCE_NAMEβ the window has the given instance name.-N CLASS_NAMEβ the window has the given class name.-a WM_NAMEβ the window has the given wm name.-t WIDβ the target window for thebelowandaboveactions.-p PIDβ the window has the given pid.-k CODEβ use the given code for thekey_press,key_release,button_pressandbutton_releaseactions.-x [Β±]PIXELSβ window x coordinate (or delta) for themoveandpointer_motionaction.-y [Β±]PIXELSβ window y coordinate (or delta) for themoveandpointer_motionaction.-w [Β±]PIXELSβ window width (or delta) for theresizeaction.-h [Β±]PIXELSβ window height (or delta) for theresizeaction. yes bestie,-his also the help action up in ACTIONS β context is everything π-mβ wait for the existence of a matching window.-sβ handle symbolic desktop numbers.
π EXAMPLES π
vibe check: here are the exact moves, copy-paste ready.
Close the focused window:
xdo close
Close all the windows having the same class as the focused window:
xdo close -c
Hide all the windows of the current desktop except the focused window:
xdo hide -dr
Activate the window which ID is 0x00800109:
xdo activate 0x00800109
Send fake key press/release events with keycode 46 to the focused window:
xdo key_press -k 46; sleep 0.2; xdo key_release -k 46
Xdo 0.5.7, dated 09/18/2017 β XDO(1), signing off. mwah π
π¦ where this page comes from
- alpine 3.24: xdo-doc 0.5.7-r1 Β· BSD-2-Clause
- arch rolling: xdo 0.5.7-3 Β· BSD
- debian bookworm: xdo 0.5.7-1+b2 Β· BSD-2-Clause
- debian trixie: xdo 0.5.7-2 Β· BSD-2-Clause
- nixos 26.05: xdo 0.5.7
- nixpkgs unstable: xdo 0.5.7
- ubuntu jammy: xdo 0.5.7-1 Β· BSD-2-Clause
- ubuntu noble: xdo 0.5.7-1 Β· BSD-2-Clause
- ubuntu questing: xdo 0.5.7-2
- ubuntu resolute: xdo 0.5.7-2build1 Β· BSD-2-Clause
- ubuntu stonking: xdo 0.5.7-2build1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms