There is a wmctrl command line tool that allows you to interact with XWMH / NetWM window managers.
For instance,
wmctrl -l
lists all windows managed by the window manager, and
wmctrl -a Mozilla
activates the first window in the list with the line "Mozilla" in the title. There are other ways to select windows; the above is just an example.
wmctrl allows you to move and resize windows.
source share