Posts tagged wmctrl

Wmctrl Recap – Placing Windows Automatically on Boot – Compiz Viewports

Wmctrl allows you to move windows around the screen, resize windows and other options. For a full list of options use: wmctrl --help For compiz, the desktop is extended in either/and the x y directions. For example if you have 4 sides to the cube your x direction is extended 4 times. If you desktop is 1920 wide, then the second viewport, or the second side of the cube starts at x position 1921. To move a windows to the second cube face you want to relocate it to x position 1921. The -e option of wmctrl does exactly this. Use -r to select the window that you want to automatically relocate. An example of the code to use in a startup script is as follows. This code snippet replaces mythtv to the second face of my desktop cube. wmctrl -r "mythfrontend.real" -e 0,1921,0,1920,1080

You can see mythtv on the second face of the cube.

You can see mythtv on the second face of the cube.

Heres a previous post for additional reference.

Compiz Auto Move a Window to Another Desktop – Viewport

When you boot your machine you want to open a variety of windows or applications on different desktops, but they only seem to open on the main desktop even with use of the place plugin. The place plugin in compiz works for a variety of applications but does not work for VirtualBox graphical windows. Wmctrl is another plugin that allows you to move windows to different locations on the desktop. For example, if your desktop is 1920 x 1080 you can move a window to the second desktop, in the x direction, by placing it to 1921. For example if you launch MythTV automatically on boot, and you want it on the second desktop use the following in a startup session script. Wmctrl is a package in the default Ubuntu repositories give it an apt-get to install. wmctrl -r "mythfrontend.real" -e 0,1921,0,1920,1080 There are a variety of option to wmctrl, use wmctrl --help for more info. This is how I move my Windows XP to another viewport: wmctrl -r "WindowsXP [Running] - Sun VirtualBox" -e 0,3841,0,1920,1080 In this case I move it to viewport 3.