forked from gitGNU/gnu_devilspie2
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Description
Hello, thanks for this project!
I'm using it to position and create all the windows in the second screen, which in my case means: if x < 1920 then add 1920
The problem I'm having is that: if I unmaximize a window it goes back to the first screen, is there any property to change also the x of the "normal" geometry of maximized windows? Or some other way?
Thanks in advance
name = get_window_name()
type = get_window_type()
if (type ~= "WINDOW_TYPE_DESKTOP") then
print("Name: "..name)
print("Type: "..type)
x, y, width, height = get_window_geometry()
print("X: "..x..", Y: "..y..", width: "..width..", height: "..height)
if (x < 1920) then
-- set_window_position(x + 1920, y)
-- set_window_geometry(x + 1920, y, width, height)
set_window_geometry2(x + 1920, y, width, height)
end
end*edit:
As a workaround for the moment I take off the maximization, change x and then restore it, it seems to work, I'd still be interested if there are cleaner/easier solutions
max = get_window_is_maximized()
maxw = get_window_is_maximized_horizontally()
maxh = get_window_is_maximized_vertically()
if max or maxw or maxh then
unmaximize()
end if max then
maximize()
else
if maxw then
maximize_horizontally()
end
if maxh then
maximize_vertically()
end
endMetadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested