xdotool is a command-line utility for automating mouse, keyboard, window, and desktop actions on X11 systems. It uses the XTEST extension and other Xlib functionality to generate input events programmatically. Users can search for windows and then move, resize, focus, activate, hide, close, or modify them. It can also switch desktops, relocate windows between desktops, and change desktop settings when the window manager supports EWMH features. The repository includes libxdo, a C library exposing similar automation capabilities for other programs. Commands can be chained and combined into shell scripts for desktop automation workflows. Native Wayland environments are not fully supported, although XWayland compatibility has improved in newer releases.
Features
- Keyboard input simulation
- Mouse movement and click automation
- Window search and manipulation
- Virtual desktop control
- Scriptable command chaining
- Reusable libxdo C library