Skip to content
Michael Palmos edited this page Aug 3, 2020 · 19 revisions

Configuration

File

Wired doesn't create a config for you. If a config isn't found, Wired will use the default config, which can be found in the root of the repository.

Wired looks for a config file in the following locations:

  1. $XDG_CONFIG_HOME/wired/wired.ron
  2. $XDG_CONFIG_HOME/wired.ron
  3. $HOME/.config/wired/wired.ron
  4. $HOME/wired.ron

Information on Blocks

Most wired configuration works in terms of blocks. Each notification is comprised of a tree structure of blocks, where each block represents a visual part of the notification.

A basic layout configuration could consist of as little as 3 blocks:

  • A NotificationBlock, the base block for all notifications, which configures properties such as the notification background and its position.
  • Two TextBlocks: one for the summary text and one for the body text.
layout_dict: [
    (
        name: "root",
        parent: "",
        hook: Hook(parent_hook: TL, self_hook: TL),
        offset: Vec2(x: 7.0, y: 7.0),
        params: NotificationBlock(( ... )),
    ),

    (
        name: "summary",
        parent: "root",
        hook: Hook(parent_hook: TL, self_hook: TL),
        offset: Vec2(x: 0.0, y: 0.0),
        params: TextBlock((
            text: "%s",
            ...
        )),
    ),

    (
        name: "body",
        parent: "summary",
        

    children: [(          // summary block
        hook: Hook(parent_hook: TL, self_hook: TL),
        offset: Vec2(x: 0.0, y: 0.0),
        params: TextBlock((
            text: "%s",
            ...
        )),
        children: [(      // body block
            hook: Hook(parent_hook: MR, self_hook: ML),
            offset: Vec2(x: 0.0, y: 0.0),
            params: TextBlock((
                text: "%b",
                ...
            )),
            children: [],
        )],
    )],
),

In human readable terms, this is basically:

  • Notification Block
    • Text Block
      • Text Block