Cleaned up layoutmanager code
This commit is contained in:
@ -1,38 +0,0 @@
|
||||
local layoutbox = {}
|
||||
|
||||
layoutbox.make = function(screen)
|
||||
local widget
|
||||
|
||||
widget = wibox.widget {
|
||||
{
|
||||
awful.widget.layoutbox(screen),
|
||||
margins = beautiful.dpi(3),
|
||||
layout = wibox.container.margin,
|
||||
},
|
||||
layout = wibox.container.background,
|
||||
}
|
||||
|
||||
-- Setup buttons
|
||||
widget:buttons(
|
||||
gears.table.join(
|
||||
awful.button({ }, 1, function () layoutmanager:next_alt() end),
|
||||
awful.button({ }, 3, function () layoutmanager:prev_alt() end),
|
||||
awful.button({ }, 4, function () layoutmanager:next() end),
|
||||
awful.button({ }, 5, function () layoutmanager:prev() end)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
-- Change background when mouse is over widget
|
||||
widget:connect_signal("mouse::enter", function(result)
|
||||
widget.bg = beautiful.color.bar.hover_bg
|
||||
end)
|
||||
|
||||
widget:connect_signal("mouse::leave", function(result)
|
||||
widget.bg = beautiful.color.transparent
|
||||
end)
|
||||
|
||||
return widget
|
||||
end
|
||||
|
||||
return layoutbox.make
|
Reference in New Issue
Block a user