Xwit allows one to call some X11 functions from the command line or a shell script.
xwit will resize, iconify, pop, and move windows given by name or id, change an icon, title or name, set the screen saver going, and change individual key autorepeat settings, move the mouse cursor, etc.