
xdotool
This tool automates input and control of your window manager in X11.
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.
xdotool Screenshots
xdotool Features
xdotool information
Supported Languages
- English
Comments and Reviews
Tags
- Automation
- automated-tasks
- automation-tool
- create-hotkeys
pidof but for X11. Detect pid manually with some window. Clean output with xdotool selectwindow getwindowpid.
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
No record and replay. No magic autotimings. Just list of commands.
Easy as first glance but painful and very fragile in general.
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.