

xdotool
17 likes
This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc. It does this using X11's XTEST extension and other Xlib functions.
Cost / License
- Free
- Open Source
Platforms
- Linux
- X11
Features
- Command line interface
- Support for scripting
- Workflow Automation
- X11/Xorg
- Support for Hotkeys
- Macro Recording
Tags
- Automation
- automation-tool
- create-hotkeys
- automated-tasks
xdotool News & Activities
Highlights All activities
Recent activities
zynix added xdotool as alternative to CrossMacro
POX added xdotool as alternative to Hammerflow
What is xdotool?
This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc. It does this using X11's XTEST extension and other Xlib functions.
Additionally, you can search for windows and move, resize, hide, and modify window properties like the title. If your window manager supports it, you can use xdotool to switch desktops, move windows between desktops, and change the number of desktops.







Comments and Reviews
These commands will report pid for active window every 1 second without errors. Only active window switch and not mouse hover! These commands will not capture actions that are faster than the delay.
while true; do sleep 1; xdotool getactivewindow getwindowpid 2/dev/null; done
Definitely does not come close to what AHK does. It does do a lot of window-related stuff but falls VERY short in the hotkey-specific things. xbindkeys combined with this helps, but still reaches nowhere near the level of AHK.
sleek, nifty and powerful utility that (when used in scripts) makes up for the lack of
AutoHotkey under Linux.