awesomerc: make titlebar optional and disabled by default
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
06fac9a151
commit
b7568c44ea
|
@ -52,6 +52,9 @@ fg_focus = "#ffffff"
|
||||||
border_focus = bg_focus
|
border_focus = bg_focus
|
||||||
border_marked = "#91231C"
|
border_marked = "#91231C"
|
||||||
|
|
||||||
|
-- Define if we want to use titlebar on all applications
|
||||||
|
use_titlebar = false
|
||||||
|
|
||||||
awesome.font_set(font)
|
awesome.font_set(font)
|
||||||
awesome.colors_set({ fg = fg_normal, bg = bg_normal })
|
awesome.colors_set({ fg = fg_normal, bg = bg_normal })
|
||||||
|
|
||||||
|
@ -292,7 +295,9 @@ function hook_focus(c)
|
||||||
if not awful.client.ismarked(c) then
|
if not awful.client.ismarked(c) then
|
||||||
c.border_color = border_focus
|
c.border_color = border_focus
|
||||||
end
|
end
|
||||||
awful.titlebar.update(c, bg_normal, fg_normal, bg_focus, fg_focus)
|
if use_titlebar then
|
||||||
|
awful.titlebar.update(c, bg_normal, fg_normal, bg_focus, fg_focus)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Hook function to execute when unfocusing a client.
|
-- Hook function to execute when unfocusing a client.
|
||||||
|
@ -300,7 +305,9 @@ function hook_unfocus(c)
|
||||||
if not awful.client.ismarked(c) then
|
if not awful.client.ismarked(c) then
|
||||||
c.border_color = border_normal
|
c.border_color = border_normal
|
||||||
end
|
end
|
||||||
awful.titlebar.update(c, bg_normal, fg_normal, bg_focus, fg_focus)
|
if use_titlebar then
|
||||||
|
awful.titlebar.update(c, bg_normal, fg_normal, bg_focus, fg_focus)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Hook function to execute when marking a client
|
-- Hook function to execute when marking a client
|
||||||
|
@ -325,9 +332,11 @@ end
|
||||||
function hook_manage(c)
|
function hook_manage(c)
|
||||||
-- Set floating placement to be smart!
|
-- Set floating placement to be smart!
|
||||||
c.floating_placement = "smart"
|
c.floating_placement = "smart"
|
||||||
-- Add a titlebar
|
if use_titlebar then
|
||||||
c.titlebar = awful.titlebar.new({ fg = fg, bg = bg, modkey = modkey })
|
-- Add a titlebar
|
||||||
awful.titlebar.update(c, bg_normal, fg_normal, bg_focus, fg_focus)
|
c.titlebar = awful.titlebar.new({ fg = fg, bg = bg, modkey = modkey })
|
||||||
|
awful.titlebar.update(c, bg_normal, fg_normal, bg_focus, fg_focus)
|
||||||
|
end
|
||||||
-- Add mouse bindings
|
-- Add mouse bindings
|
||||||
c:mouse_add(mouse({ }, 1, function (c) c:focus_set(); c:raise() end))
|
c:mouse_add(mouse({ }, 1, function (c) c:focus_set(); c:raise() end))
|
||||||
c:mouse_add(mouse({ modkey }, 1, function (c) c:mouse_move() end))
|
c:mouse_add(mouse({ modkey }, 1, function (c) c:mouse_move() end))
|
||||||
|
@ -385,8 +394,10 @@ function hook_timer ()
|
||||||
end
|
end
|
||||||
|
|
||||||
function hook_titleupdate (c)
|
function hook_titleupdate (c)
|
||||||
-- Update titlebar
|
if use_titlebar then
|
||||||
awful.titlebar.update(c, bg_normal, fg_normal, bg_focus, fg_focus)
|
-- Update titlebar
|
||||||
|
awful.titlebar.update(c, bg_normal, fg_normal, bg_focus, fg_focus)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Set up some hooks
|
-- Set up some hooks
|
||||||
|
|
Loading…
Reference in New Issue