sisyphus/config/wired/wired.ron

192 lines
6.4 KiB
Text
Raw Normal View History

2022-06-07 02:06:10 +02:00
// ~/.config/wired/wired.ron
// Also see https://github.com/Toqozz/wired-notify/blob/master/wired.ron
(
max_notifications: 20,
timeout: 4000,
poll_interval: 16, // 16ms =~ 60Hz / 7ms =~ 144Hz
idle_treshold: 3600,
replacing_enabled: true,
replacing_resets_timeout: true,
debug: false,
debug_color: Color(r: 0.0, g: 1.0, b: 0.0, a: 1.0), // Primary color for debug rectangles.
debug_color_alt: Color(r: 1.0, g: 0.0, b: 0.0, a: 1.0), // Secondary color for debug rectangles.
layout_blocks: [
(
name: "root",
parent: "",
hook: Hook(parent_anchor: BR, self_anchor: BR),
offset: Vec2(x: -15, y: -15),
render_anti_criteria: [Progress],
params: NotificationBlock((
monitor: 0,
border_width: 1,
border_rounding: 0, // Wayland doesn't support this at the moment anyways.
background_color: Color(hex: "#171717"),
border_color: Color(hex: "ffffff"),
gap: Vec2(x: 0, y: -10),
// Stacking notifications align at the right, underneath each other.
notification_hook: Hook(parent_anchor: TR, self_anchor: BR),
)),
),
// Default: No image
(
name: "default-summary",
parent: "root",
hook: Hook(parent_anchor: TL, self_anchor: TL),
offset: Vec2(x: 0, y: 0),
render_anti_criteria: [HintImage, Progress],
params: TextBlock((
padding: Padding(left: 5, right: 5, top: 5, bottom: 5),
text: "%s",
font: "Letter 14",
color: Color(hex: "#ffffff"),
dimensions: (width: (min: 300, max: 300), height: (min: 0, max: 100)),
)),
),
(
name: "default-body",
parent: "default-summary",
hook: Hook(parent_anchor: BL, self_anchor: TL),
offset: Vec2(x: 0, y: 0),
render_criteria: [Body], // Hide if there is no body, avoiding empty gaps.
render_anti_criteria: [HintImage, Progress],
params: TextBlock((
padding: Padding(left: 5, right: 5, top: -2, bottom: 5),
text: "%b",
font: "Letter 12",
color: Color(hex: "#ffffff"),
dimensions: (width: (min: 0, max: 300), height: (min: 0, max: 100)),
)),
),
// Image
(
name: "image",
parent: "root",
hook: Hook(parent_anchor: TL, self_anchor: TL),
offset: Vec2(x: 0, y:0),
render_criteria: [HintImage],
params: ImageBlock((
image_type: Hint,
padding: Padding(left: 5, right: 5, top: 5, bottom: 5),
rounding: 0,
scale_width: 50,
scale_height: 50,
filter_mode: Triangle,
)),
),
(
name: "image-summary",
parent: "image",
hook: Hook(parent_anchor: TL, self_anchor: TL),
offset: Vec2(x: 55, y:0),
render_criteria: [HintImage],
params: TextBlock((
padding: Padding(left: 5, right: 5, top: 5, bottom: 5),
text: "%s (%n)",
font: "Letter 14",
color: Color(hex: "#ffffff"),
dimensions: (width: (min: 300, max: 300), height: (min: 0, max: 100)),
)),
),
(
name: "image-body",
parent: "image-summary",
hook: Hook(parent_anchor: BL, self_anchor: TL),
offset: Vec2(x: 0, y: 0),
render_criteria: [HintImage],
params: ScrollingTextBlock((
padding: Padding(left: 5, right: 5, top: -2, bottom: 5),
text: "%b",
font: "Letter 12",
color: Color(hex: "#ffffff"),
width: (min: 0, max: 300),
scroll_speed: 0.1,
lhs_dist: 10,
rhs_dist: 10,
scroll_t: 1,
)),
),
// Status, for things like volume, brightness etc
(
name: "status-root",
parent: "",
hook: Hook(parent_anchor: BM, self_anchor: BM),
offset: Vec2(x: 0, y: -100),
render_criteria: [Progress],
params: NotificationBlock((
monitor: 0,
border_width: 1,
border_rounding: 0, // Wayland doesn't support this at the moment anyways.
background_color: Color(hex: "#171717"),
border_color: Color(hex: "ffffff"),
gap: Vec2(x: 0, y: 0),
notification_hook: Hook(parent_anchor: BM, self_anchor: TM),
)),
),
(
name: "status-summary",
parent: "status-root",
hook: Hook(parent_anchor: TL, self_anchor: TL),
offset: Vec2(x: 0, y: 0),
params: TextBlock((
padding: Padding(left: 7, right: 7, top: 7, bottom: 5),
text: "%s",
font: "Letter 13",
color: Color(hex: "#ffffff"),
dimensions: (width: (min: 250, max: 250), height: (min: 75, max: 75)),
)),
),
(
name: "status-bar",
parent: "status-summary",
hook: Hook(parent_anchor: TL, self_anchor: TL),
offset: Vec2(x: 0, y: 35),
render_criteria: [Progress],
params: ProgressBlock((
padding: Padding(left: 7, right: 7, top: 5, bottom: 5),
border_width: 2,
border_rounding: 2,
border_color: Color(hex: "#ffffff"),
fill_rounding: 1,
background_color: Color(hex: "#171717"),
fill_color: Color(hex: "#ffffff"),
width: -1.0,
height: 30,
)),
),
],
// https://github.com/Toqozz/wired-notify/wiki/Shortcuts
shortcuts: ShortcutsConfig (
notification_interact: 1,
notification_close: 2,
// notification_closeall: 99,
// notification_pause: 99,
notification_action1: 3,
// notification_action2: 99,
// notification_action3: 99,
// notification_action4: 99,
),
)