From 3fb2f66fc406043153758aa83fdf7ff55eb7d4a1 Mon Sep 17 00:00:00 2001 From: rolv Date: Thu, 20 Jun 2024 20:39:43 +0100 Subject: [PATCH] fix: only apply default display name if none is given --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 56ce3ea..b241f03 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,7 +23,9 @@ impl<'rofi> rofi_mode::Mode<'rofi> for Mode<'rofi> { const NAME: &'static str = "nerdy\0"; fn init(mut api: rofi_mode::Api<'rofi>) -> Result { - api.set_display_name("nerd icon"); + if api.display_name().is_none() { + api.set_display_name("nerd icon"); + }; tracing_subscriber::registry() .with(fmt::layer().without_time().with_line_number(true))