Skip to content

Battery block doesn't show up when alone #138

@kleescian

Description

@kleescian

This works fine:

local blocks = {
    oxwm.bar.block.datetime({
        format = "{}",
        date_format = "%a, %b %d - %-I:%M %P",
        interval = 1,
        color = colors.cyan,
        underline = true,
    }),
    oxwm.bar.block.static({
        text = "",
        interval = 999999999,
        color = colors.lavender,
        underline = false,
    }),
    -- Uncomment to add battery status (useful for laptops)
     oxwm.bar.block.battery({
         format = "{}%",
         charging = "⚡ {}%",
         discharging = "- {}%",
         full = "✓ {}%",
         interval = 30,
         color = colors.green,
         underline = false,
     }),
};

While this shows an empty bar:

local blocks = {
    oxwm.bar.block.static({
        text = "",
        interval = 999999999,
        color = colors.lavender,
        underline = false,
    }),
    -- Uncomment to add battery status (useful for laptops)
     oxwm.bar.block.battery({
         format = "{}%",
         charging = "⚡ {}%",
         discharging = "- {}%",
         full = "✓ {}%",
         interval = 30,
         color = colors.green,
         underline = false,
     }),
};

It seems like having any non-static block before makes the battery block work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions