From bc3eaa8d6209d448b0eef6e5a39774da8043b272 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 13 Feb 2014 11:24:03 +0100 Subject: trigger: add extra colors in trigger monitor buffer --- src/plugins/trigger/trigger-buffer.c | 10 +++++++--- src/plugins/trigger/trigger-callback.c | 14 +++++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'src/plugins/trigger') diff --git a/src/plugins/trigger/trigger-buffer.c b/src/plugins/trigger/trigger-buffer.c index 0e5256d49..51c34077f 100644 --- a/src/plugins/trigger/trigger-buffer.c +++ b/src/plugins/trigger/trigger-buffer.c @@ -57,9 +57,12 @@ trigger_buffer_hashtable_map_cb (void *data, value_no_color = (weechat_config_boolean (trigger_config_look_monitor_strip_colors)) ? weechat_string_remove_color ((const char *)value, NULL) : NULL; weechat_printf_tags (trigger_buffer, "no_trigger", - "\t %s: \"%s\"", + "\t %s: %s\"%s%s%s\"", (char *)key, - (value_no_color) ? value_no_color : (const char *)value); + weechat_color ("chat_delimiters"), + weechat_color ("reset"), + (value_no_color) ? value_no_color : (const char *)value, + weechat_color ("chat_delimiters")); if (value_no_color) free (value_no_color); } @@ -109,7 +112,8 @@ trigger_buffer_display_trigger (struct t_trigger *trigger, if (buffer) { weechat_printf_tags (trigger_buffer, "no_trigger", - "\t buffer: %s", + "\t buffer: %s%s", + weechat_color ("chat_buffer"), weechat_buffer_get_string (buffer, "full_name")); } if (pointers) diff --git a/src/plugins/trigger/trigger-callback.c b/src/plugins/trigger/trigger-callback.c index 42b6aeb12..3277ef366 100644 --- a/src/plugins/trigger/trigger-callback.c +++ b/src/plugins/trigger/trigger-callback.c @@ -175,9 +175,17 @@ trigger_callback_replace_regex (struct t_trigger *trigger, if (trigger_buffer) { weechat_printf_tags (trigger_buffer, "no_trigger", - "\t regex %d (%s): \"%s%s\"", - i + 1, ptr_key, value, - weechat_color ("reset")); + "\t regex %d %s(%s%s%s)%s: %s\"%s%s%s\"", + i + 1, + weechat_color ("chat_delimiters"), + weechat_color ("reset"), + ptr_key, + weechat_color ("chat_delimiters"), + weechat_color ("reset"), + weechat_color ("chat_delimiters"), + weechat_color ("reset"), + value, + weechat_color ("chat_delimiters")); } weechat_hashtable_set (extra_vars, ptr_key, value); -- cgit v1.2.3