Nicklist colours

v1
Tony Olagbaiye 6 years ago
parent 06b81810a5
commit b762aa3a8c
No known key found for this signature in database
GPG Key ID: 7420820577A31D11

@ -7,7 +7,7 @@ endif
RM=rm -f
CFLAGS+=$(DBGCFLAGS) -fno-omit-frame-pointer -fPIC -std=gnu99 -g -Wall -Wextra -Werror-implicit-function-declaration -Wno-missing-field-initializers -Ilibwebsockets/include -Ijson-c
LDFLAGS+=-shared -g $(DBGCFLAGS) $(DBGLDFLAGS)
LDLIBS=-lgnutls
LDLIBS=-Wl,--push-state,--as-needed -lgnutls
PREFIX ?= /usr/local
LIBDIR ?= $(PREFIX)/lib
@ -73,7 +73,7 @@ distclean: clean
install: slack.so
ifeq ($(shell id -u),0)
$(INSTALL) -s -t $(DESTDIR)$(LIBDIR)/weechat/plugins -D -m 0755 slack.so
$(INSTALL) -s -t $(DESTDIR)$(LIBDIR)/weechat/plugins -D -m 0644 slack.so
else
$(INSTALL) -s -t ~/.weechat/plugins -D -m 0755 slack.so
endif

@ -17,6 +17,11 @@ const char *slack_user_get_colour(struct t_slack_user *user)
return weechat_info_get("nick_color", user->profile.display_name);
}
const char *slack_user_get_colour_for_nicklist(struct t_slack_user *user)
{
return weechat_info_get("nick_color_name", user->profile.display_name);
}
const char *slack_user_as_prefix(struct t_slack_workspace *workspace,
struct t_slack_user *user,
const char *name)
@ -83,11 +88,11 @@ void slack_user_nicklist_add(struct t_slack_workspace *workspace,
"+" : "...");
weechat_nicklist_add_nick(ptr_buffer, ptr_group,
user->profile.display_name,
weechat_color(user->is_away ?
"weechat.color.nicklist_away" :
"bar_fg"),
user->is_away ?
"weechat.color.nicklist_away" :
slack_user_get_colour_for_nicklist(user),
user->is_away ? "+" : "",
weechat_color(""),
"bar_fg",
1);
}

Loading…
Cancel
Save