From 5cbefd746f19781f7f843bebc7a4c717563b72c8 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Mon, 15 Nov 2021 07:42:45 +0100 Subject: [PATCH] Marks also for containers --- src/config.rs | 4 ++-- src/tree.rs | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 2e70ed0..06a5b9a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -218,7 +218,7 @@ impl Default for Format { window_format: Some( "img:{app_icon}:text:{indent}{app_name} — \ {urgency_start}“{title}”{urgency_end} \ - on workspace {workspace_name} {marks} \ + on workspace {workspace_name} {marks} \ ({id})" .to_string(), ), @@ -229,7 +229,7 @@ impl Default for Format { ), container_format: Some( "{indent}Container {layout} \ - on workspace {workspace_name} \ + on workspace {workspace_name} {marks} \ ({id})" .to_string(), ), diff --git a/src/tree.rs b/src/tree.rs index 2e14023..42eb9b4 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -411,6 +411,13 @@ impl DisplayFormat for DisplayNode<'_> { .replace("{indent}", &indent.repeat(self.get_indent_level())) .replace("{layout}", format!("{:?}", self.node.layout).as_str()) .replace("{id}", format!("{}", self.node.id).as_str()) + .replace( + "{marks}", + &maybe_html_escape( + html_escape, + &self.node.marks.join(", "), + ), + ) .replace( "{workspace_name}", &maybe_html_escape(