Changed bar item buffer_plugin to show plugin name and identity name.
This commit is contained in:
parent
2bcef77aa5
commit
5a3b0cc583
1 changed files with 7 additions and 5 deletions
|
@ -58,13 +58,15 @@ bar_item_buffer_plugin(void *data, struct t_gui_bar_item *item,
|
|||
|
||||
char string[256];
|
||||
|
||||
const char *name = weechat_plugin_get_name(weechat_plugin);
|
||||
|
||||
const char *status = identity->is_connected ? "online" : "offline";
|
||||
const char *color = weechat_color(identity->is_connected ? "green" : "red");
|
||||
const char *plugin_name = weechat_plugin_get_name(weechat_plugin);
|
||||
const char *identity_name = identity->name;
|
||||
|
||||
snprintf(string, sizeof(string),
|
||||
"%s %s%s", name, color, status);
|
||||
"%s%s/%s%s",
|
||||
plugin_name,
|
||||
weechat_color("bar_delim"),
|
||||
weechat_color("bar_fg"),
|
||||
identity_name);
|
||||
|
||||
return strdup(string);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue