DocsExtensionsWASM Night Mode

wasm-night-mode

Turns colors off outside the daytime window (WebAssembly config provider).

  • Kind: config_provider
  • Artifact: xfetch-extension-wasm-night-mode.wasm (core module)
  • Capabilities: none (reads the WASI clock)
  • Language: Rust

Installation

xfetch extension install ./extensions/wasm-night-mode

Configuration

{
    "config_providers": [
        {
            "extension": "wasm-night-mode",
            "args": {}
        }
    ]
}

Arguments

FieldTypeDefaultDescription
night_startnumber22First hour (inclusive) of the night window.
night_endnumber7First hour of the day window; may wrap midnight.
utc_offsetnumber0Hours from UTC, used instead of a timezone database.
dim_colorsbooltrueSets show_colors: false at night.
night_palettestringunchangedOptional palette style applied at night.

Behavior

During the day the config is returned untouched; at night colors are dimmed (and the palette style is switched when configured).