HL.WorkspaceRuleSpec

class HL.WorkspaceRuleSpec

Table accepted by hl.workspace_rule().

Shape

{
    workspace = string,
    enabled = boolean?,
    monitor = string?,
    default = boolean?,
    persistent = boolean?,
    gaps_in = integer | HL.CssGap?,
    gaps_out = integer | HL.CssGap?,
    float_gaps = integer | HL.CssGap?,
    border_size = integer?,
    no_border = boolean?,
    no_rounding = boolean?,
    decorate = boolean?,
    no_shadow = boolean?,
    on_created_empty = string?,
    default_name = string?,
    layout = string?,
    layout_opts = table<string, string | number | boolean>?,
    animation = string?,
}

Fields

workspacestring

Workspace selector string. Required.

enabledboolean, optional

Whether the rule is enabled. Defaults to true.

monitorstring, optional

Monitor assigned to the workspace.

defaultboolean, optional

Mark as a default workspace rule.

persistentboolean, optional

Make the workspace persistent.

gaps_in, gaps_out, float_gapsinteger or HL.CssGap, optional

Gap overrides.

border_sizeinteger, optional

Border size override.

no_border, no_rounding, decorate, no_shadowboolean, optional

Decoration-related workspace overrides.

on_created_emptystring, optional

Command run when the workspace is created empty.

default_namestring, optional

Default workspace name.

layoutstring, optional

Layout override.

layout_optstable, optional

Layout options table. Keys must be strings; values may be strings, numbers, or booleans.

animationstring, optional

Animation override.

Used by

hl.workspace_rule()

Register a workspace rule.