You are not logged in.
I have XFCE and a configured devilspie2. Also, i have a triple monitor setup on an ATI graphics card.
My goal: Putting windows on different viewports on the same workspace.
Example: Terminal on the left monitor (viewport 1), Chrome on the center monitor (viewport 2) and Thunderbird on the right monitor (viewport 3).
Here is what i tried:
if (get_window_class()=="Terminal") then
set_window_workspace(1);
set_viewport(1);
end
if (get_window_class()=="Chromium") then
set_window_workspace(1);
set_viewport(2);
end
if (get_window_class()=="Thunderbird") then
set_window_workspace(1);
set_viewport(3);
endBut, that doesn't work. All applications appear on the currently active screen - the one i clicked on the last time. I tried setting windows positions instead of the viewport, too (my resolution is 1200x1600 + 2560x1600 + 1200x1600 = 4960x1600):
if (get_window_class()=="Terminal") then
set_window_workspace(1);
set_viewport(1);
set_window_position(0,0);
end
if (get_window_class()=="Chromium") then
set_window_workspace(1);
set_viewport(1);
set_window_position(1200,0);
end
if (get_window_class()=="Thunderbird") then
set_window_workspace(1);
set_viewport(1);
set_window_position(3760,0);
endSame result as above. If i change set_window_workspace to 2, the window is correctly moved to the second workspace. The trigger is therefore correct.
Any ideas what i could do here?
Last edited by Alp (2013-09-07 11:54:23)
Offline
I figured it out.
There were two problems:
1) Maximized windows sometimes cannot be moved via "set_window_position"
2) The width of my center screen is more than double of my left screen. So, when a maximum-width window is moved from the center to the left, still more than the half of the window is on the center screen. When you maximize it, it lands on the center screen again.
Solution:
You need to unmaximize the window, set the new position and width, and then maximize it again (if needed):
xleft = 0; -- x coords of left screen
wleft = 1200; -- width of left screen
if (get_window_class()=="Terminal") then
set_window_workspace(1);
set_viewport(1);
unmaximize();
set_window_geometry(xleft,0,wleft,-1);
maximize();
endLast edited by Alp (2013-09-07 11:54:47)
Offline