Maximilian W. Zeller
2009-08-08 13:05:17 UTC
hi again
i am not quite familiar with lua but think it must be something like
the following to extend winprop by the option position. I don't know
how to make ion3 use this file. Is it enough to just put it in the
~/.ion3 folder? And as i said i don't know if this is how its done. I
got these functions from the documentation but i am not sure if i used
them right.
-- usage:
-- defwinprop {
-- class = "something"
-- instance = "anything"
-- float = true
-- position = { x = 100, y = 100 }
-- }
windowpos = {}
function windowpos.set (cwin, tab) {
local prop = ioncore.get_winprop(cwin)
if prop and prop.float and prop.position then
local horizmul = prop.position.x
local vertmul = prop.position.y
WFloatFrame.begin_resize(cwin)
WFloatFrame.do_move(cwin, horizmul, vertmul)
WFloatFrame.end_resize(cwin)
return true
end
return false
}
ioncore.get_hook("clientwin_do_manage_alt"):add(windowpos.set)
i am not quite familiar with lua but think it must be something like
the following to extend winprop by the option position. I don't know
how to make ion3 use this file. Is it enough to just put it in the
~/.ion3 folder? And as i said i don't know if this is how its done. I
got these functions from the documentation but i am not sure if i used
them right.
-- usage:
-- defwinprop {
-- class = "something"
-- instance = "anything"
-- float = true
-- position = { x = 100, y = 100 }
-- }
windowpos = {}
function windowpos.set (cwin, tab) {
local prop = ioncore.get_winprop(cwin)
if prop and prop.float and prop.position then
local horizmul = prop.position.x
local vertmul = prop.position.y
WFloatFrame.begin_resize(cwin)
WFloatFrame.do_move(cwin, horizmul, vertmul)
WFloatFrame.end_resize(cwin)
return true
end
return false
}
ioncore.get_hook("clientwin_do_manage_alt"):add(windowpos.set)