From 91c57edc73f15397ea0de70c4a6a6532c35caf2a Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Sun, 16 Oct 2022 01:00:14 +0100 Subject: [PATCH] feat(sys-info): pango markup support --- src/modules/sysinfo.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/sysinfo.rs b/src/modules/sysinfo.rs index 00ae104..1d7217d 100644 --- a/src/modules/sysinfo.rs +++ b/src/modules/sysinfo.rs @@ -245,7 +245,11 @@ impl Module for SysInfoModule { let mut labels = Vec::new(); for format in &self.format { - let label = Label::builder().label(format).name("item").build(); + let label = Label::builder() + .label(format) + .use_markup(true) + .name("item") + .build(); label.set_angle(info.bar_position.get_angle()); container.add(&label); labels.push(label); @@ -261,7 +265,7 @@ impl Module for SysInfoModule { .to_string() }); - label.set_text(format_compiled.as_ref()); + label.set_markup(format_compiled.as_ref()); } Continue(true)