Skip to content

Introduce theming facilities #317

Open
@unode

Description

@unode

Currently the calendar widget code assumes that fg and bg are available in notification_preset which may not be true if a custom table is passed by the user.

Example of failing code:

lain.widget.calendar({
    attach_to = { mytextclock },
    notification_preset = {
        fg = beautiful.fg_focus,
        font = beautiful.font_name .. " " .. beautiful.font_size,
    },
})

It fails complaining that bg is nil. Other widgets may also be affected if the default can be replaced a user provided table and assumptions are made.

Also as a side-note, is there any reason why beautiful isn't used for default values instead of hardcoding a specific font (Monospace 10 in this case)?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions