-
Notifications
You must be signed in to change notification settings - Fork 28
Config
Michael Palmos edited this page Aug 3, 2020
·
19 revisions
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:
$XDG_CONFIG_HOME/wired/wired.ron
$XDG_CONFIG_HOME/wired.ron
$HOME/.config/wired/wired.ron
$HOME/wired.ron
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
TextBlock
s: 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
- Text Block