From d44a07d437eb799e742a0b3446e1329d88d61a23 Mon Sep 17 00:00:00 2001 From: MaxVerevkin Date: Fri, 9 Aug 2024 21:16:20 +0300 Subject: config: add show_tags option --- README.md | 1 + src/bar.rs | 2 +- src/config.rs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 07abd64..5e2248c 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ position = "top" # either "top" or "bottom" layer = "top" # one of "top", "overlay", "bottom" or "background" hide_inactive_tags = true invert_touchpad_scrolling = true +show_tags = true show_layout_name = true blend = true # whether tags/blocks colors should blend with bar's background show_mode = true diff --git a/src/bar.rs b/src/bar.rs index ed1a2c9..18be97e 100644 --- a/src/bar.rs +++ b/src/bar.rs @@ -207,7 +207,7 @@ impl Bar { } // Compute tags - if self.tags_computed.is_empty() { + if ss.config.show_tags && self.tags_computed.is_empty() { for tag in &self.tags { let (bg, fg) = if tag.is_urgent { (ss.config.tag_urgent_bg, ss.config.tag_urgent_fg) diff --git a/src/config.rs b/src/config.rs index 0863e1d..e84607a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -44,6 +44,7 @@ pub struct Config { pub layer: Layer, pub hide_inactive_tags: bool, pub invert_touchpad_scrolling: bool, + pub show_tags: bool, pub show_layout_name: bool, pub blend: bool, pub show_mode: bool, @@ -88,6 +89,7 @@ impl Default for Config { layer: Layer::Top, hide_inactive_tags: true, invert_touchpad_scrolling: true, + show_tags: true, show_layout_name: true, blend: true, show_mode: true, -- cgit v1.3.1