OXWMOXWM

Status Bar

Configure the built-in status bar and blocks

OXWM includes a built-in status bar with a modular block system.

Font

Set the status bar font:

oxwm.bar.set_font("monospace:style=Bold:size=10")

Use fc-list to see available fonts on your system.

Blocks

Blocks are widgets displayed in the status bar. Define them using constructors:

local blocks = {
    oxwm.bar.block.ram({
        format = "RAM: {used}/{total} GB",
        interval = 5,
        color = "#7aa2f7",
        underline = true,
    }),
    oxwm.bar.block.datetime({
        format = "{}",
        date_format = "%a, %b %d - %-I:%M %P",
        interval = 1,
        color = "#0db9d7",
        underline = true,
    }),
}

oxwm.bar.set_blocks(blocks)

Available Block Types

RAM

oxwm.bar.block.ram({
    format = "RAM: {used}/{total} GB",
    interval = 5,
    color = "#7aa2f7",
    underline = true,
})

Date/Time

oxwm.bar.block.datetime({
    format = "{}",
    date_format = "%H:%M",  -- strftime format
    interval = 60,
    color = "#0db9d7",
    underline = true,
})

Shell Command

oxwm.bar.block.shell({
    format = "{}",
    command = "uname -r",
    interval = 999999999,  -- run once
    color = "#f7768e",
    underline = true,
})

Static Text

oxwm.bar.block.static({
    text = " | ",
    interval = 999999999,
    color = "#a9b1d6",
    underline = false,
})

Battery

oxwm.bar.block.battery({
    format = "Bat: {}%",
    charging = "⚡ {}%",
    discharging = "- {}%",
    full = "✓ {}%",
    interval = 30,
    color = "#9ece6a",
    underline = true,
})

Tag Color Schemes

Configure how tags appear in the bar:

-- Unoccupied tags (no windows)
oxwm.bar.set_scheme_normal("#bbbbbb", "#1a1b26", "#444444")

-- Occupied tags (has windows)
oxwm.bar.set_scheme_occupied("#0db9d7", "#1a1b26", "#0db9d7")

-- Currently selected tag
oxwm.bar.set_scheme_selected("#0db9d7", "#1a1b26", "#ad8ee6")

Parameters: foreground, background, underline

On this page