On 22.01.2012 18:06, Alexander Yakushev wrote:
> On 01/22/2012 06:46 PM, Uli Schlachter wrote:
>> "Normal" wiboxes can be
>> moved by modifying their geometry directly (:geometry({ x = 42, y = 12 })).
> Thank you for the answer.
>
> I cannot use awful.wibox because I don't need the wibox to be attached
> to the particurlar side of the screen (but rather "floating"). But I
> still hadn't understood about the default wiboxes. If the only thing I
> can do is to set the geometry directly, then how do I suppose to know
> what are the coordinates of the second screen, for example?
Via e.g. screen[2]:geometry() which gives you the geometry of the second screen.
> I'll try to be more specific. I was modifying the menubar widget to make
> it work on the latest git version and stumbled on this problem. Before
> (in the stable 3.4.11) I just set the .screen property to some number
> for the wibox to make it visible, and nil to hide it. The number
> specified on what screen the wibox should appear. Now the .visible field
> is responsible for it, and setting .screen property does nothing.
Uhm, but don't you care where on the screen the menubar will be displayed?
I just checked the old C code. When you moved a wibox to another screen by
setting its .screen property, it was placed in the top-left corner of that
screen.
> So what should I do, for instance, to show the menubar on the screen
> where mouse.screen is located?
For the top-left corner (assuming w is your wibox):
local geom = screen[mouse.screen]:geometry()
w.x = geom.x
w.y = geom.y
Cheers,
Uli
--
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
--
To unsubscribe, send mail to [email protected].