layoutlist: Support scrollwheel by default.

It acts like the default `rc.lua` tag/tasklist widgets.

Idea from https://github.com/awesomeWM/awesome/issues/3388
This commit is contained in:
Emmanuel Lepage Vallee 2021-10-13 20:51:56 -07:00
parent 1d5af8e8ad
commit 01020a197d
1 changed files with 5 additions and 3 deletions

View File

@ -36,9 +36,11 @@ local surface = require("gears.surface")
local module = {}
local default_buttons = gtable.join(
abutton({ }, 1, function(a) a.callback() end)
)
local default_buttons = {
abutton({ }, 1, function(a) a.callback( ) end),
abutton({ }, 4, function() alayout.inc(-1) end),
abutton({ }, 5, function() alayout.inc( 1) end),
}
local function wb_label(item, _, textbox)
local selected = alayout.get(item.screen) == item.layout