使用 layout.fixed 时居中位置任务列表

Center position tasklist when using layout.fixed

我对顶部栏使用以下设置:

  -- Create a promptbox for each screen
  s.mypromptbox = awful.widget.prompt()

  -- Create a taglist widget
  s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)

  -- Create a tasklist widget
  s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons)

  -- Create the wibox
  s.mywibox = awful.wibar({ position = theme.position, screen = s, height = theme.height })

  -- Add widgets to the wibox
  s.mywibox:setup {
    layout = wibox.layout.align.horizontal,
    {
      -- Left widgets
        layout = wibox.layout.fixed.horizontal,
        s.mytaglist,
        s.mypromptbox,
    },
    s.mytasklist, -- Middle widget
    {
    -- Right widgets
      layout = wibox.layout.fixed.horizontal,
      theme.systray,
      theme.spr_left,
      theme.volume,
      theme.battery,
      theme.clock,
      theme.spr_right
    },
  }

这导致:

我已经禁用了任务名称。我想要完成的是 在中心显示任务列表的图标。我怎样才能做到这一点,同时保留左侧的标签和系统托盘 在右侧?

编辑

当应用 expand = outside 时,我得到以下信息:

编辑2

当我添加这些容器设置时:

-- Tasklist container
local tl = wibox.container.background(s.mytasklist, theme.bg_normal, gears.shape.rectangle)
local pl = wibox.container.margin(tl, 2, 2, 3, 3)
local tasklist = wibox.container.place(pl, {halign="center"})

我得到:

哪个好一点,但仍然没有完全居中。

我通过对水平对齐应用 expand = "none" 解决了这个问题。如下:

-- Add widgets to the wibox
s.mywibox:setup {
    layout = wibox.layout.align.horizontal,
    expand = "none",
    {
      -- Left widgets
        layout = wibox.layout.fixed.horizontal,
        s.mytaglist,
        s.mypromptbox,
    },
      -- Middle widget
      s.mytasklist,
    {
    -- Right widgets
      layout = wibox.layout.fixed.horizontal,
      theme.systray,
      theme.spr_left,
      theme.volume,
      theme.battery,
      theme.clock,
      theme.spr_right
    },
  }
end)

在 Awesome v4.2-257-g59aa4ac7 上完美对齐栏如下: