Skip to content

barlib

create

function barlib.create(monitor: Monitor, bar_props: BarProps)
  -> Bar

Deprecated

Use monitor:attach instead.

Creates a new bar on a specified monitor.

Example

local monitors = hitokage.monitor.get_all()

for _, monitor in ipairs(monitors) do
  hitokage.bar.create(monitor, {
    children = {
      { Box = {} },
      { Workspace = { halign = "Center", item_height = 22, item_width = 22 } },
      { Clock = { format = "%a %b %u %r", halign = 'End' } },
    },
  })
end