diff --git a/rc.lua.blackburn b/rc.lua.blackburn index 0c2bfe4..4d543b3 100644 --- a/rc.lua.blackburn +++ b/rc.lua.blackburn @@ -592,9 +592,9 @@ awful.rules.rules = { -- }}} -- {{{ Signals --- Signal function to execute when a new client appears. +-- signal function to execute when a new client appears. client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus + -- enable sloppy focus c:connect_signal("mouse::enter", function(c) if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier and awful.client.focus.filter(c) then @@ -607,6 +607,45 @@ client.connect_signal("manage", function (c, startup) awful.placement.no_overlap(c) awful.placement.no_offscreen(c) end + + local titlebars_enabled = false + if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then + -- buttons for the titlebar + local buttons = awful.util.table.join( + awful.button({ }, 1, function() + client.focus = c + c:raise() + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + client.focus = c + c:raise() + awful.mouse.client.resize(c) + end) + ) + + -- widgets that are aligned to the right + local right_layout = wibox.layout.fixed.horizontal() + right_layout:add(awful.titlebar.widget.floatingbutton(c)) + right_layout:add(awful.titlebar.widget.maximizedbutton(c)) + right_layout:add(awful.titlebar.widget.stickybutton(c)) + right_layout:add(awful.titlebar.widget.ontopbutton(c)) + right_layout:add(awful.titlebar.widget.closebutton(c)) + + -- the title goes in the middle + local middle_layout = wibox.layout.flex.horizontal() + local title = awful.titlebar.widget.titlewidget(c) + title:set_align("center") + middle_layout:add(title) + middle_layout:buttons(buttons) + + -- now bring it all together + local layout = wibox.layout.align.horizontal() + layout:set_right(right_layout) + layout:set_middle(middle_layout) + + awful.titlebar(c,{size=16}):set_widget(layout) + end end) -- No border for maximized clients diff --git a/rc.lua.holo b/rc.lua.holo index b372f8e..9c3a28f 100644 --- a/rc.lua.holo +++ b/rc.lua.holo @@ -742,6 +742,45 @@ client.connect_signal("manage", function (c, startup) awful.placement.no_overlap(c) awful.placement.no_offscreen(c) end + + local titlebars_enabled = false + if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then + -- buttons for the titlebar + local buttons = awful.util.table.join( + awful.button({ }, 1, function() + client.focus = c + c:raise() + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + client.focus = c + c:raise() + awful.mouse.client.resize(c) + end) + ) + + -- Widgets that are aligned to the right + local right_layout = wibox.layout.fixed.horizontal() + right_layout:add(awful.titlebar.widget.floatingbutton(c)) + right_layout:add(awful.titlebar.widget.maximizedbutton(c)) + right_layout:add(awful.titlebar.widget.stickybutton(c)) + right_layout:add(awful.titlebar.widget.ontopbutton(c)) + right_layout:add(awful.titlebar.widget.closebutton(c)) + + -- The title goes in the middle + local middle_layout = wibox.layout.flex.horizontal() + local title = awful.titlebar.widget.titlewidget(c) + title:set_align("center") + middle_layout:add(title) + middle_layout:buttons(buttons) + + -- Now bring it all together + local layout = wibox.layout.align.horizontal() + layout:set_right(right_layout) + layout:set_middle(middle_layout) + + awful.titlebar(c,{size=16}):set_widget(layout) + end end) -- No border for maximized clients diff --git a/rc.lua.multicolor b/rc.lua.multicolor index 10eeafb..3649248 100644 --- a/rc.lua.multicolor +++ b/rc.lua.multicolor @@ -655,9 +655,9 @@ awful.rules.rules = { -- }}} -- {{{ Signals --- Signal function to execute when a new client appears. +-- signal function to execute when a new client appears. client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus + -- enable sloppy focus c:connect_signal("mouse::enter", function(c) if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier and awful.client.focus.filter(c) then @@ -670,6 +670,45 @@ client.connect_signal("manage", function (c, startup) awful.placement.no_overlap(c) awful.placement.no_offscreen(c) end + + local titlebars_enabled = false + if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then + -- buttons for the titlebar + local buttons = awful.util.table.join( + awful.button({ }, 1, function() + client.focus = c + c:raise() + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + client.focus = c + c:raise() + awful.mouse.client.resize(c) + end) + ) + + -- widgets that are aligned to the right + local right_layout = wibox.layout.fixed.horizontal() + right_layout:add(awful.titlebar.widget.floatingbutton(c)) + right_layout:add(awful.titlebar.widget.maximizedbutton(c)) + right_layout:add(awful.titlebar.widget.stickybutton(c)) + right_layout:add(awful.titlebar.widget.ontopbutton(c)) + right_layout:add(awful.titlebar.widget.closebutton(c)) + + -- the title goes in the middle + local middle_layout = wibox.layout.flex.horizontal() + local title = awful.titlebar.widget.titlewidget(c) + title:set_align("center") + middle_layout:add(title) + middle_layout:buttons(buttons) + + -- now bring it all together + local layout = wibox.layout.align.horizontal() + layout:set_right(right_layout) + layout:set_middle(middle_layout) + + awful.titlebar(c,{size=16}):set_widget(layout) + end end) -- No border for maximized clients diff --git a/rc.lua.powerarrow-darker b/rc.lua.powerarrow-darker index 18b5593..1aedd4a 100644 --- a/rc.lua.powerarrow-darker +++ b/rc.lua.powerarrow-darker @@ -644,9 +644,9 @@ awful.rules.rules = { -- }}} -- {{{ Signals --- Signal function to execute when a new client appears. +-- signal function to execute when a new client appears. client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus + -- enable sloppy focus c:connect_signal("mouse::enter", function(c) if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier and awful.client.focus.filter(c) then @@ -659,6 +659,45 @@ client.connect_signal("manage", function (c, startup) awful.placement.no_overlap(c) awful.placement.no_offscreen(c) end + + local titlebars_enabled = false + if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then + -- buttons for the titlebar + local buttons = awful.util.table.join( + awful.button({ }, 1, function() + client.focus = c + c:raise() + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + client.focus = c + c:raise() + awful.mouse.client.resize(c) + end) + ) + + -- widgets that are aligned to the right + local right_layout = wibox.layout.fixed.horizontal() + right_layout:add(awful.titlebar.widget.floatingbutton(c)) + right_layout:add(awful.titlebar.widget.maximizedbutton(c)) + right_layout:add(awful.titlebar.widget.stickybutton(c)) + right_layout:add(awful.titlebar.widget.ontopbutton(c)) + right_layout:add(awful.titlebar.widget.closebutton(c)) + + -- the title goes in the middle + local middle_layout = wibox.layout.flex.horizontal() + local title = awful.titlebar.widget.titlewidget(c) + title:set_align("center") + middle_layout:add(title) + middle_layout:buttons(buttons) + + -- now bring it all together + local layout = wibox.layout.align.horizontal() + layout:set_right(right_layout) + layout:set_middle(middle_layout) + + awful.titlebar(c,{size=16}):set_widget(layout) + end end) -- No border for maximized clients diff --git a/rc.lua.rainbow b/rc.lua.rainbow index c4fed85..2e8a8c3 100644 --- a/rc.lua.rainbow +++ b/rc.lua.rainbow @@ -590,9 +590,9 @@ awful.rules.rules = { -- }}} -- {{{ Signals --- Signal function to execute when a new client appears. +-- signal function to execute when a new client appears. client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus + -- enable sloppy focus c:connect_signal("mouse::enter", function(c) if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier and awful.client.focus.filter(c) then @@ -605,6 +605,45 @@ client.connect_signal("manage", function (c, startup) awful.placement.no_overlap(c) awful.placement.no_offscreen(c) end + + local titlebars_enabled = false + if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then + -- buttons for the titlebar + local buttons = awful.util.table.join( + awful.button({ }, 1, function() + client.focus = c + c:raise() + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + client.focus = c + c:raise() + awful.mouse.client.resize(c) + end) + ) + + -- widgets that are aligned to the right + local right_layout = wibox.layout.fixed.horizontal() + right_layout:add(awful.titlebar.widget.floatingbutton(c)) + right_layout:add(awful.titlebar.widget.maximizedbutton(c)) + right_layout:add(awful.titlebar.widget.stickybutton(c)) + right_layout:add(awful.titlebar.widget.ontopbutton(c)) + right_layout:add(awful.titlebar.widget.closebutton(c)) + + -- the title goes in the middle + local middle_layout = wibox.layout.flex.horizontal() + local title = awful.titlebar.widget.titlewidget(c) + title:set_align("center") + middle_layout:add(title) + middle_layout:buttons(buttons) + + -- now bring it all together + local layout = wibox.layout.align.horizontal() + layout:set_right(right_layout) + layout:set_middle(middle_layout) + + awful.titlebar(c,{size=16}):set_widget(layout) + end end) -- No border for maximized clients diff --git a/rc.lua.steamburn b/rc.lua.steamburn index 6a84208..f6d521d 100644 --- a/rc.lua.steamburn +++ b/rc.lua.steamburn @@ -599,9 +599,9 @@ awful.rules.rules = { -- }}} -- {{{ Signals --- Signal function to execute when a new client appears. +-- signal function to execute when a new client appears. client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus + -- enable sloppy focus c:connect_signal("mouse::enter", function(c) if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier and awful.client.focus.filter(c) then @@ -614,6 +614,45 @@ client.connect_signal("manage", function (c, startup) awful.placement.no_overlap(c) awful.placement.no_offscreen(c) end + + local titlebars_enabled = false + if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then + -- buttons for the titlebar + local buttons = awful.util.table.join( + awful.button({ }, 1, function() + client.focus = c + c:raise() + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + client.focus = c + c:raise() + awful.mouse.client.resize(c) + end) + ) + + -- widgets that are aligned to the right + local right_layout = wibox.layout.fixed.horizontal() + right_layout:add(awful.titlebar.widget.floatingbutton(c)) + right_layout:add(awful.titlebar.widget.maximizedbutton(c)) + right_layout:add(awful.titlebar.widget.stickybutton(c)) + right_layout:add(awful.titlebar.widget.ontopbutton(c)) + right_layout:add(awful.titlebar.widget.closebutton(c)) + + -- the title goes in the middle + local middle_layout = wibox.layout.flex.horizontal() + local title = awful.titlebar.widget.titlewidget(c) + title:set_align("center") + middle_layout:add(title) + middle_layout:buttons(buttons) + + -- now bring it all together + local layout = wibox.layout.align.horizontal() + layout:set_right(right_layout) + layout:set_middle(middle_layout) + + awful.titlebar(c,{size=16}):set_widget(layout) + end end) -- No border for maximized clients