libxdo helps you send fake mouse and keyboard input, search for windows, perform various window managment tasks such as desktop changes, window movement, etc.