awesome  

Re: titlebar just for the floating app

giggz
Mon, 30 Mar 2009 14:22:15 -0700

[...]

> Yeah!!!!!!! Big thx!
> 
> I have added that too:
> 
> if use_titlebar_floatapp then
> -- Hook function to execute when the client is fullscreen or not.
> awful.hooks.property.register(function (c, prop)
>   -- Remove the titlebar in fullscreen
>   if c.fullscreen then
>      awful.titlebar.remove(c)
>   elseif not c.fullscreen then
>     -- Re-Add a titlebar for the floating app no more in fullscreen
>     local cls = c.class
>     local inst = c.instance
>     if floatapps[cls] then
>        awful.titlebar.add(c, { modkey = modkey })
>     elseif floatapps[inst] then
>        awful.titlebar.add(c, { modkey = modkey })
>     end
>   end
> end)
> end
> 
> With it the titlebar is now removed for the floating app in fullscreen.
> And the titlebar is back in the normal mode. I have removed the prop ==
> "geometry" check, because the window without the deleted titlebar has
> the geometry of the window with the titlebar. So in fullscreen the
> statusbar was visible.
> 
> Thx a lot!
> Best regards,
> Guillaume
> 
> 

it's better with the c.titlebar == nil check :

-- Titlebar for floating app enabled.
if use_titlebar_floatapp then
-- Hook function to execute when the client is fullscreen or not.
  awful.hooks.property.register(function (c, prop)
    -- Remove the titlebar in fullscreen
    if c.fullscreen then
       awful.titlebar.remove(c)
    elseif not c.fullscreen and c.titlebar == nil then
      -- Re-Add a titlebar for the floating app no more in fullscreen
      local cls = c.class
      local inst = c.instance
      if floatapps[cls] then
         awful.titlebar.add(c, { modkey = modkey })
      elseif floatapps[inst] then
         awful.titlebar.add(c, { modkey = modkey })
      end
    end
  end)
end


-- 
To unsubscribe, send mail to awesome-unsubscr...@naquadah.org.