a command line tool that can simulate X11 keyboard input and mouse activity and manipulate windows
xdotool
lets you automate window manipulation and inject events under x11. In can be used from the command line and in scripts. Its main capabilities are:
- List and filter windows by application class, title, process ID, etc.
- Move and resize windows, iconify or maximize them, change the focus, etc.
- Switch to another desktop (workspace), and move windows across desktops.
- Simulate keypresses and mouse actions, e.g. to enter input and trigger commands in GUI applications.
It works through X11's XTEST extension and other Xlib functions.