I've been doing some debugging. The problem is in systray:fit. It's
getting num_entries = 0 so the returned width is also 0. After that
systray:draw is never called. I assume this is because the fit
geometry request returned a 0 width. If I force num_entries to be the
effective number of icons in my tray, the margin layout is then shown
as expected (the right margin size with the icons inside).

I don't know why capi.awesome.systray() is returning 0 when called
from systray:fit. If I remove the margin layout then systray:draw is
called and num_entries is correctly computed.

I'm going to report this as a bug.

Cheers
--
Carlos

On Sun, Aug 17, 2014 at 10:26 PM, Carlos Pita <[email protected]> wrote:
> Maybe it's a bug. If I change the clock for the systray in the code above, 
> i.e.:
>
>        systray_margin:set_margins(5)
>        systray_margin:set_widget(mytextclock)
>        right_layout:add(systray_margin)
>     end
>     --right_layout:add(mytextclock)
>
> it works just fine, margins included. The systray won't work even with
> margins = 0. Should I report this or is it a PEBKAC?
>
> Cheers
> --
> Carlos
>
> On Sun, Aug 17, 2014 at 9:18 PM, Carlos Pita <[email protected]> wrote:
>>> If you are using a very recent version of Awesome, then yes! See:
>>>
>>> https://github.com/awesomeWM/awesome/commit/07595ca6179083e302ae3596806261b8a71ab98b
>>
>> Awesome! :)
>>
>>> Other spacing, such as left, right, top and bottom padding can be
>>> added the usual way with widgets in Awesome 3.5. Awesome 3.4 have some
>>> more issues.
>>
>> Regarding this, I've been doing some experiments but still to no
>> avail. I'm a newbie so I'm going to ask for some help here. What I did
>> is the following:
>>
>> I took the default rc.lua and modified it this way:
>>
>>     -- Widgets that are aligned to the right
>>     local right_layout = wibox.layout.fixed.horizontal()
>>     if s == 1 then
>>        local systray = wibox.widget.systray()
>>        local systray_margin = wibox.layout.margin()
>>        systray_margin:set_margins(2)
>>        systray_margin:set_widget(systray)
>>        right_layout:add(systray) -- or add(systray_margin)
>>     end
>>     right_layout:add(mytextclock)
>>     right_layout:add(mylayoutbox[s])
>>
>> But then if I add the systray widget to the right_layout, I get no
>> additional margins. And if I add the systray_margin layout instead, I
>> get no systray at all. What am I doing wrong? Is the systray_margin
>> layout intended to "prepare" to widget to be added to the
>> right_layout? Or is it intended to be used as a nested layout?
>>
>> Best regards
>> --
>> Carlos
>>
>>
>>>
>>> Have a nice day!
>>>
>>> On 17 August 2014 19:05, Carlos Pita <[email protected]> wrote:
>>>> Hi guys,
>>>>
>>>> I'm pretty sure the answer is no but I will try anyway: is there any
>>>> way to set padding for the systray (both, for the systray as a whole
>>>> and separation between icons)? Or to set an upper limit to the icon
>>>> size? I mean, without patching the C code.
>>>>
>>>> Cheers
>>>> --
>>>> Carlos
>>>>
>>>> --
>>>> To unsubscribe, send mail to [email protected].

-- 
To unsubscribe, send mail to [email protected].

Reply via email to