How to remove title bar in awesome window manager ver >4
Asked Answered
B

3

26

I've recently upgraded my machine, and am now at awesome version 4.x. There is now a titlebar of sorts with close, ontop, floating, maximized, etc... buttons on right. Can I get rid of this? What config would I use to have this be universally turned off?

Blackstone answered 10/3, 2017 at 17:27 Comment(0)
O
51

In your rc.lua file, look for

-- Add title bars to normal clients and dialogs
{ rule_any = {type = { "normal", "dialog" }
  }, properties = { titlebars_enabled = true }
},

and change

titlebars_enabled = true

to

titlebars_enabled = false

Osei answered 10/3, 2017 at 21:43 Comment(0)
T
3

A bit late for this (1 year ago !)...
I replace as said previously by Emmanuel in the rules section. But when I made titlebars appear they were empty, no icons, no textbox... nothing.
My workaround was to leave titlebars_enabled = true in the rules section.
and in the signals section (in the "manage" handle) : add the titlebar and hide it (the 2 last lines in the code below) when I start awesome. When I toggle its display, the titlebar appears with icons and texts :

-- Signal function to execute when a new client appears.
client.connect_signal("manage", function (c)
  -- Set the windows at the slave,
  -- i.e. put it at the end of others instead of setting it master.
  -- if not awesome.startup then awful.client.setslave(c) end

 if awesome.startup and
  not c.size_hints.user_position
  and not c.size_hints.program_position then
    -- Prevent clients from being unreachable after screen count changes.
    awful.placement.no_offscreen(c)
 end
--
 awful.titlebar(c,{size=10})
 awful.titlebar.hide(c)
end)
Tapster answered 10/3, 2018 at 15:28 Comment(1)
well, awful.titlebar(c,{size=10}) not a must for this function just changing the size of title bar. and to re-show the title bar, awful.titlebar.toggle(c) will do.Rouvin
T
3

Just to combine both answers from @Emmanuel and @david and have a full example with hidden titlebar by default and a key combination to toggle it:

Leave titlebars_enabled = true in the rule_any block, this avoids the problem of having an empty titlebar when showing it.

Hide the titlebar when a new client(window) appears adding awful.titlebar.hide(c) in the manage signal:

client.connect_signal("manage", function (c)
    -- ... more code

    awful.titlebar.hide(c)
end)

Then add a key binding, in this case Modkey + Control + t, to call awful.titlebar.toggle.

clientkeys = my_table.join(
    -- ... more key bindings
    -- Remember to add a comma to the end of the previous keybinding above!

    awful.key({ modkey, 'Control' }, 't', function (c) awful.titlebar.toggle(c) end,
        {description = 'toggle title bar', group = 'client'})
)

Tosha answered 24/3, 2020 at 16:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.