Hi, this is my first post in the list.

While pushing 3.4 to his limit, I had problem with the vertical layouts.
Flex is nice, but when you want to write a "conky like" desktop wibox,  add
some live informations in a naughty notication, add icons on the desktop
using a single wibox and some other limitation that I did not found yet,
flex just don't do the job. Horizontal layouts have leftright and rightleft
and it work fine, so I ported them to the vertical layout.

I know that they are present in git, but according to lukkash on IRC, trying
to backport them would have been harder. I think this modification should be
added in 3.4.2 just because it is lacking and the next release is far away.
It work fine for me and is a strait forward port from horizontal, so unless
I forgot something, it should not have introduced bugs.

Here is the code:
http://pastebin.ca/1671608

Now somethign totally different, the ability to stack wiboxes kind of
disappeared in 3.4, here is a little function that restore it, if you want
to add it, just comment the line that hide wiboxes when a new one appear and
call this function in wibox.set_position and wibox_update_strut. I think
stacjing is a more logical behavior than going on top. I see the current
behavior as a bug, but I understand that many of you are not agree so I just
post the code here, do what you want with it.

function get_offset(position, wibox)
  local offset = 0
  for _,wprop in ipairs(wiboxes)do
    if wprop.wibox.position == position then
      if wprop.wibox.visible == true then
         if wprop.wibox ~= wibox then
           offset = offset + wprop.wibox.height
         end
      end
    end
  end
  return offset
end

Reply via email to