Added /presence command to show contacts presence
This commit is contained in:
@@ -80,6 +80,12 @@ static struct colours_t {
|
||||
NCURSES_COLOR_T titlebarencrypted;
|
||||
NCURSES_COLOR_T titlebaruntrusted;
|
||||
NCURSES_COLOR_T titlebartrusted;
|
||||
NCURSES_COLOR_T titlebaronline;
|
||||
NCURSES_COLOR_T titlebaroffline;
|
||||
NCURSES_COLOR_T titlebaraway;
|
||||
NCURSES_COLOR_T titlebarxa;
|
||||
NCURSES_COLOR_T titlebardnd;
|
||||
NCURSES_COLOR_T titlebarchat;
|
||||
NCURSES_COLOR_T statusbartext;
|
||||
NCURSES_COLOR_T statusbarbrackets;
|
||||
NCURSES_COLOR_T statusbaractive;
|
||||
@@ -206,43 +212,49 @@ theme_init_colours(void)
|
||||
init_pair(12, colour_prefs.titlebarencrypted, colour_prefs.titlebar);
|
||||
init_pair(13, colour_prefs.titlebaruntrusted, colour_prefs.titlebar);
|
||||
init_pair(14, colour_prefs.titlebartrusted, colour_prefs.titlebar);
|
||||
init_pair(15, colour_prefs.titlebaronline, colour_prefs.titlebar);
|
||||
init_pair(16, colour_prefs.titlebaroffline, colour_prefs.titlebar);
|
||||
init_pair(17, colour_prefs.titlebaraway, colour_prefs.titlebar);
|
||||
init_pair(18, colour_prefs.titlebarchat, colour_prefs.titlebar);
|
||||
init_pair(19, colour_prefs.titlebardnd, colour_prefs.titlebar);
|
||||
init_pair(20, colour_prefs.titlebarxa, colour_prefs.titlebar);
|
||||
|
||||
// status bar
|
||||
init_pair(15, colour_prefs.statusbartext, colour_prefs.statusbar);
|
||||
init_pair(16, colour_prefs.statusbarbrackets, colour_prefs.statusbar);
|
||||
init_pair(17, colour_prefs.statusbaractive, colour_prefs.statusbar);
|
||||
init_pair(18, colour_prefs.statusbarnew, colour_prefs.statusbar);
|
||||
init_pair(21, colour_prefs.statusbartext, colour_prefs.statusbar);
|
||||
init_pair(22, colour_prefs.statusbarbrackets, colour_prefs.statusbar);
|
||||
init_pair(23, colour_prefs.statusbaractive, colour_prefs.statusbar);
|
||||
init_pair(24, colour_prefs.statusbarnew, colour_prefs.statusbar);
|
||||
|
||||
// chat
|
||||
init_pair(19, colour_prefs.me, colour_prefs.bkgnd);
|
||||
init_pair(20, colour_prefs.them, colour_prefs.bkgnd);
|
||||
init_pair(25, colour_prefs.me, colour_prefs.bkgnd);
|
||||
init_pair(26, colour_prefs.them, colour_prefs.bkgnd);
|
||||
|
||||
// room chat
|
||||
init_pair(21, colour_prefs.roominfo, colour_prefs.bkgnd);
|
||||
init_pair(22, colour_prefs.roommention, colour_prefs.bkgnd);
|
||||
init_pair(27, colour_prefs.roominfo, colour_prefs.bkgnd);
|
||||
init_pair(28, colour_prefs.roommention, colour_prefs.bkgnd);
|
||||
|
||||
// statuses
|
||||
init_pair(23, colour_prefs.online, colour_prefs.bkgnd);
|
||||
init_pair(24, colour_prefs.offline, colour_prefs.bkgnd);
|
||||
init_pair(25, colour_prefs.away, colour_prefs.bkgnd);
|
||||
init_pair(26, colour_prefs.chat, colour_prefs.bkgnd);
|
||||
init_pair(27, colour_prefs.dnd, colour_prefs.bkgnd);
|
||||
init_pair(28, colour_prefs.xa, colour_prefs.bkgnd);
|
||||
init_pair(29, colour_prefs.online, colour_prefs.bkgnd);
|
||||
init_pair(30, colour_prefs.offline, colour_prefs.bkgnd);
|
||||
init_pair(31, colour_prefs.away, colour_prefs.bkgnd);
|
||||
init_pair(32, colour_prefs.chat, colour_prefs.bkgnd);
|
||||
init_pair(33, colour_prefs.dnd, colour_prefs.bkgnd);
|
||||
init_pair(34, colour_prefs.xa, colour_prefs.bkgnd);
|
||||
|
||||
// states
|
||||
init_pair(29, colour_prefs.typing, colour_prefs.bkgnd);
|
||||
init_pair(30, colour_prefs.gone, colour_prefs.bkgnd);
|
||||
init_pair(35, colour_prefs.typing, colour_prefs.bkgnd);
|
||||
init_pair(36, colour_prefs.gone, colour_prefs.bkgnd);
|
||||
|
||||
// subscription status
|
||||
init_pair(31, colour_prefs.subscribed, colour_prefs.bkgnd);
|
||||
init_pair(32, colour_prefs.unsubscribed, colour_prefs.bkgnd);
|
||||
init_pair(37, colour_prefs.subscribed, colour_prefs.bkgnd);
|
||||
init_pair(38, colour_prefs.unsubscribed, colour_prefs.bkgnd);
|
||||
|
||||
// otr messages
|
||||
init_pair(33, colour_prefs.otrstartedtrusted, colour_prefs.bkgnd);
|
||||
init_pair(34, colour_prefs.otrstarteduntrusted, colour_prefs.bkgnd);
|
||||
init_pair(35, colour_prefs.otrended, colour_prefs.bkgnd);
|
||||
init_pair(36, colour_prefs.otrtrusted, colour_prefs.bkgnd);
|
||||
init_pair(37, colour_prefs.otruntrusted, colour_prefs.bkgnd);
|
||||
init_pair(39, colour_prefs.otrstartedtrusted, colour_prefs.bkgnd);
|
||||
init_pair(40, colour_prefs.otrstarteduntrusted, colour_prefs.bkgnd);
|
||||
init_pair(41, colour_prefs.otrended, colour_prefs.bkgnd);
|
||||
init_pair(42, colour_prefs.otrtrusted, colour_prefs.bkgnd);
|
||||
init_pair(43, colour_prefs.otruntrusted, colour_prefs.bkgnd);
|
||||
}
|
||||
|
||||
static NCURSES_COLOR_T
|
||||
@@ -313,6 +325,30 @@ _load_colours(void)
|
||||
_set_colour(titlebartrusted_val, &colour_prefs.titlebartrusted, COLOR_WHITE);
|
||||
g_free(titlebartrusted_val);
|
||||
|
||||
gchar *titlebaronline_val = g_key_file_get_string(theme, "colours", "titlebar.online", NULL);
|
||||
_set_colour(titlebaronline_val, &colour_prefs.titlebaronline, COLOR_WHITE);
|
||||
g_free(titlebaronline_val);
|
||||
|
||||
gchar *titlebaroffline_val = g_key_file_get_string(theme, "colours", "titlebar.offline", NULL);
|
||||
_set_colour(titlebaroffline_val, &colour_prefs.titlebaroffline, COLOR_WHITE);
|
||||
g_free(titlebaroffline_val);
|
||||
|
||||
gchar *titlebaraway_val = g_key_file_get_string(theme, "colours", "titlebar.away", NULL);
|
||||
_set_colour(titlebaraway_val, &colour_prefs.titlebaraway, COLOR_WHITE);
|
||||
g_free(titlebaraway_val);
|
||||
|
||||
gchar *titlebarchat_val = g_key_file_get_string(theme, "colours", "titlebar.chat", NULL);
|
||||
_set_colour(titlebarchat_val, &colour_prefs.titlebarchat, COLOR_WHITE);
|
||||
g_free(titlebarchat_val);
|
||||
|
||||
gchar *titlebardnd_val = g_key_file_get_string(theme, "colours", "titlebar.dnd", NULL);
|
||||
_set_colour(titlebardnd_val, &colour_prefs.titlebardnd, COLOR_WHITE);
|
||||
g_free(titlebardnd_val);
|
||||
|
||||
gchar *titlebarxa_val = g_key_file_get_string(theme, "colours", "titlebar.xa", NULL);
|
||||
_set_colour(titlebarxa_val, &colour_prefs.titlebarxa, COLOR_WHITE);
|
||||
g_free(titlebarxa_val);
|
||||
|
||||
gchar *statusbartext_val = g_key_file_get_string(theme, "colours", "statusbar.text", NULL);
|
||||
_set_colour(statusbartext_val, &colour_prefs.statusbartext, COLOR_WHITE);
|
||||
g_free(statusbartext_val);
|
||||
|
||||
Reference in New Issue
Block a user