Struts/docks/panels in Devilspie

102 views
Skip to first unread message

Mark Hewitt

unread,
Jan 23, 2013, 6:39:51 AM1/23/13
to devil...@googlegroups.com
Is it possible (or maybe a future feature) to use Devilspie to make an application into a panel/dock? IE its space is "reserved" and other applications will maximise next to it rather than over it.

I understand this can be done in X using "struts"?

Mark Hewitt

unread,
Jan 23, 2013, 11:25:48 AM1/23/13
to devil...@googlegroups.com
Hmm...supposedly you just need an option to set the window type hint to "panel"...seems to be how Conky does it...afraid my gui programming (and coding in general) is very lacking...is this doable as an option?

Andreas Rönnquist

unread,
Jan 24, 2013, 1:22:13 PM1/24/13
to devil...@googlegroups.com
I will take a look at it - I cannot promise anything regarding when it
will be done though - I don't really know even how to do it either, so
a lot of reading is required from my side...

Hints and tips (and patches ;) would be greatly appreciated...

best regards
-- Andreas Rönnquist
gus...@gusnan.se
signature.asc

Mark Hewitt

unread,
Jan 25, 2013, 5:05:11 AM1/25/13
to devil...@googlegroups.com
Hmmm...how is the selection in "wintype" actually passed to the windowing system? Because it should be just a matter of having an additional option in there to pass "Panel" instead of "Normal", "Dialog" etc.

Andreas Rönnquist

unread,
Jan 25, 2013, 10:58:12 AM1/25/13
to devil...@googlegroups.com
I have committed some code to the git repository which I believe should
suit you needs - Could you please try it out?

With it, you can do something like

set_window_type("window_type_panel")

(See the README for details.)

-- Andreas Rönnquist
gus...@gusnan.se
signature.asc

Mark Hewitt

unread,
Jan 28, 2013, 10:24:41 AM1/28/13
to devil...@googlegroups.com
Thankyou Andreas. I've checked out the new code and tested it...it does seem to be setting the type correctly and there are no errors, but the window doesn't seem to behave correctly nonetheless. Now I'm wondering whether Ubuntu 12.10 properly implements those window hints - although Conky seems to be able to make it work. Very odd. Never mind, thankyou for your help!

Mark

Mark Hewitt

unread,
Jan 28, 2013, 11:05:46 AM1/28/13
to devilspie2
The plot thickens! It turns out that the wintype=panel setting doesn't
actually set the struts necessary to reserve that space, apologies,
that was my misunderstanding. The struts need to be set manually via
the parameter _NET_WM_STRUT_PARTIAL

I've found another way round it (using xprop -set) but if you're
interested in adding this functionality in future, the format for the
value is documented in
http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html - it's 12
integers corresponding to "left, right, top, bottom, left_start_y,
left_end_y, right_start_y, right_end_y, top_start_x, top_end_x,
bottom_start_x, bottom_end_x", this allows for reserving areas that
don't stretch all the way to the edges of the screen. Any unused
integers are set to 0. So the value for reserving 300 pixels at the
right hand edge of the desktop is:
" 0, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0"

the xprop command I used (to apply this to the Gwibber window) being:
xprop -f _NET_WM_STRUT_PARTIAL 32c -name Gwibber -set
_NET_WM_STRUT_PARTIAL " 0, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0"
Reply all
Reply to author
Forward
0 new messages