From 096315e72d75a18c7332ec128911687d3945b374 Mon Sep 17 00:00:00 2001 From: FelixKratz Date: Mon, 23 Aug 2021 14:45:28 +0200 Subject: [PATCH] removed title component --- src/bar_item.c | 12 +----------- src/message.c | 2 +- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/bar_item.c b/src/bar_item.c index 5c6cc1f..3764f44 100644 --- a/src/bar_item.c +++ b/src/bar_item.c @@ -64,21 +64,11 @@ void bar_item_script_update(struct bar_item* bar_item, bool forced) { void bar_item_update_component(struct bar_item* bar_item, uint32_t did, uint32_t sid) { if (bar_item->type == BAR_COMPONENT) { - if (strcmp(bar_item->identifier, BAR_COMPONENT_TITLE) == 0) { - char* focused_window = focused_window_title(); - if (focused_window) { - bar_item_set_label(bar_item, string_copy(focused_window)); - } - else { - bar_item_set_label(bar_item, string_copy("")); - } - } - else if (strcmp(bar_item->identifier, BAR_COMPONENT_SPACE) == 0) { + if (strcmp(bar_item->identifier, BAR_COMPONENT_SPACE) == 0) { if ((1 << sid) & bar_item->associated_space && (1 << did) & bar_item->associated_display) bar_item_set_icon(bar_item, bar_item->icon, bar_item->icon_highlight_color); else bar_item_set_icon(bar_item, bar_item->icon, bar_item->icon_color); - } } } diff --git a/src/message.c b/src/message.c index 6230321..0ae66ff 100644 --- a/src/message.c +++ b/src/message.c @@ -70,7 +70,6 @@ extern bool g_verbose; #define BAR_COMPONENT_SPACE "space" #define BAR_COMPONENT_GRAPH "graph" -#define BAR_COMPONENT_TITLE "title" #define BAR_POSITION_LEFT 'l' #define BAR_POSITION_RIGHT 'r' @@ -255,6 +254,7 @@ static void handle_domain_add(FILE* rsp, struct token domain, char* message) { bar_item->identifier = token_to_string(name); } else if (token_equals(command, COMMAND_ADD_COMPONENT)) { struct token identifier = get_token(&message); + if (token_equals(identifier, "title")) printf("Title component deprecated please use windowTitle.sh script"); name = get_token(&message); position = get_token(&message);