devilspie2
devilspie2 copied to clipboard
Window frame extent? [how do i set the window position below the taskbar?]
You can't position relative to another window – at least, not directly.
One way is to position the window manually, use xwininfo
to get the position then use one of the positioning functions (set_window_position
, set_window_position2
, xy
) to move the window.
Or you can get the task bar position (again, xwininfo
) and the window frame extent (xwininfo -wm
; use any window with a frame). The rest can be calculated from that.
(You can use xdotool
instead of xwininfo
. I don't know the parameters for it, though.)
I recommend something like this:
taskbar_bottom = 40 -- from "xwininfo", "-geometry" line
window_frame = { 5, 5, 20, 5 } -- from "xwininfo -wm", "Frame extents" line
-- note: order is left, right, top, bottom
window_name = get_window_name()
if window_name == 'foo' then
set_window_position(window_frame[1], taskbar_bottom + window_frame[3])
end
It looks like I need to add a proper way of reading the frame extents at run-time (which is why the “enhancement” label is applied).
… Is the window in question using client-side decorations? Does it belong to a GTK application? (I normally force server-side decorations, so I wouldn't normally see problems with these.)
- as in program-specific? no i don't think so
- no