diff --git a/src/lib.rs b/src/lib.rs index 3703de3..3289c12 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -129,18 +129,28 @@ fn get_class(conn: &xcb::Connection, id: u32, config: &Config) -> Result { - if get_option(&config, "no_names") { + if no_names { format!("{}", icon) } else { format!("{} {}", icon, display_name) } } None => match config.general.get("default_icon") { - Some(default_icon) => format!("{} {}", default_icon, display_name), - None => format!("{}", display_name), + Some(default_icon) => { + if no_names { + format!("{}", default_icon) + } else { + format!("{} {}", default_icon, display_name) + } + } + None => { + format!("{}", display_name) + } }, }) }