mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Added main.text.me and main.text.them theme settings
This commit is contained in:
parent
0f8873b887
commit
f56cc9761f
@ -85,6 +85,8 @@ static struct colours_t {
|
||||
NCURSES_COLOR_T statusbaractive;
|
||||
NCURSES_COLOR_T statusbarnew;
|
||||
NCURSES_COLOR_T maintext;
|
||||
NCURSES_COLOR_T maintextme;
|
||||
NCURSES_COLOR_T maintextthem;
|
||||
NCURSES_COLOR_T inputtext;
|
||||
NCURSES_COLOR_T timetext;
|
||||
NCURSES_COLOR_T splashtext;
|
||||
@ -189,56 +191,58 @@ theme_init_colours(void)
|
||||
{
|
||||
// main text
|
||||
init_pair(1, colour_prefs.maintext, colour_prefs.bkgnd);
|
||||
init_pair(2, colour_prefs.splashtext, colour_prefs.bkgnd);
|
||||
init_pair(3, colour_prefs.error, colour_prefs.bkgnd);
|
||||
init_pair(4, colour_prefs.incoming, colour_prefs.bkgnd);
|
||||
init_pair(5, colour_prefs.inputtext, colour_prefs.bkgnd);
|
||||
init_pair(6, colour_prefs.timetext, colour_prefs.bkgnd);
|
||||
init_pair(2, colour_prefs.maintextme, colour_prefs.bkgnd);
|
||||
init_pair(3, colour_prefs.maintextthem, colour_prefs.bkgnd);
|
||||
init_pair(4, colour_prefs.splashtext, colour_prefs.bkgnd);
|
||||
init_pair(5, colour_prefs.error, colour_prefs.bkgnd);
|
||||
init_pair(6, colour_prefs.incoming, colour_prefs.bkgnd);
|
||||
init_pair(7, colour_prefs.inputtext, colour_prefs.bkgnd);
|
||||
init_pair(8, colour_prefs.timetext, colour_prefs.bkgnd);
|
||||
|
||||
// title bar
|
||||
init_pair(7, colour_prefs.titlebartext, colour_prefs.titlebar);
|
||||
init_pair(8, colour_prefs.titlebarbrackets, colour_prefs.titlebar);
|
||||
init_pair(9, colour_prefs.titlebarunencrypted, colour_prefs.titlebar);
|
||||
init_pair(10, colour_prefs.titlebarencrypted, colour_prefs.titlebar);
|
||||
init_pair(11, colour_prefs.titlebaruntrusted, colour_prefs.titlebar);
|
||||
init_pair(12, colour_prefs.titlebartrusted, colour_prefs.titlebar);
|
||||
init_pair(9, colour_prefs.titlebartext, colour_prefs.titlebar);
|
||||
init_pair(10, colour_prefs.titlebarbrackets, colour_prefs.titlebar);
|
||||
init_pair(11, colour_prefs.titlebarunencrypted, colour_prefs.titlebar);
|
||||
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);
|
||||
|
||||
// status bar
|
||||
init_pair(13, colour_prefs.statusbartext, colour_prefs.statusbar);
|
||||
init_pair(14, colour_prefs.statusbarbrackets, colour_prefs.statusbar);
|
||||
init_pair(15, colour_prefs.statusbaractive, colour_prefs.statusbar);
|
||||
init_pair(16, colour_prefs.statusbarnew, colour_prefs.statusbar);
|
||||
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);
|
||||
|
||||
// chat
|
||||
init_pair(17, colour_prefs.me, colour_prefs.bkgnd);
|
||||
init_pair(18, colour_prefs.them, colour_prefs.bkgnd);
|
||||
init_pair(19, colour_prefs.me, colour_prefs.bkgnd);
|
||||
init_pair(20, colour_prefs.them, colour_prefs.bkgnd);
|
||||
|
||||
// room chat
|
||||
init_pair(19, colour_prefs.roominfo, colour_prefs.bkgnd);
|
||||
init_pair(20, colour_prefs.roommention, colour_prefs.bkgnd);
|
||||
init_pair(21, colour_prefs.roominfo, colour_prefs.bkgnd);
|
||||
init_pair(22, colour_prefs.roommention, colour_prefs.bkgnd);
|
||||
|
||||
// statuses
|
||||
init_pair(21, colour_prefs.online, colour_prefs.bkgnd);
|
||||
init_pair(22, colour_prefs.offline, colour_prefs.bkgnd);
|
||||
init_pair(23, colour_prefs.away, colour_prefs.bkgnd);
|
||||
init_pair(24, colour_prefs.chat, colour_prefs.bkgnd);
|
||||
init_pair(25, colour_prefs.dnd, colour_prefs.bkgnd);
|
||||
init_pair(26, colour_prefs.xa, colour_prefs.bkgnd);
|
||||
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);
|
||||
|
||||
// states
|
||||
init_pair(27, colour_prefs.typing, colour_prefs.bkgnd);
|
||||
init_pair(28, colour_prefs.gone, colour_prefs.bkgnd);
|
||||
init_pair(29, colour_prefs.typing, colour_prefs.bkgnd);
|
||||
init_pair(30, colour_prefs.gone, colour_prefs.bkgnd);
|
||||
|
||||
// subscription status
|
||||
init_pair(29, colour_prefs.subscribed, colour_prefs.bkgnd);
|
||||
init_pair(30, colour_prefs.unsubscribed, colour_prefs.bkgnd);
|
||||
init_pair(31, colour_prefs.subscribed, colour_prefs.bkgnd);
|
||||
init_pair(32, colour_prefs.unsubscribed, colour_prefs.bkgnd);
|
||||
|
||||
// otr messages
|
||||
init_pair(31, colour_prefs.otrstartedtrusted, colour_prefs.bkgnd);
|
||||
init_pair(32, colour_prefs.otrstarteduntrusted, colour_prefs.bkgnd);
|
||||
init_pair(33, colour_prefs.otrended, colour_prefs.bkgnd);
|
||||
init_pair(34, colour_prefs.otrtrusted, colour_prefs.bkgnd);
|
||||
init_pair(35, colour_prefs.otruntrusted, colour_prefs.bkgnd);
|
||||
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);
|
||||
}
|
||||
|
||||
static NCURSES_COLOR_T
|
||||
@ -329,6 +333,14 @@ _load_colours(void)
|
||||
_set_colour(maintext_val, &colour_prefs.maintext, COLOR_WHITE);
|
||||
g_free(maintext_val);
|
||||
|
||||
gchar *maintextme_val = g_key_file_get_string(theme, "colours", "main.text.me", NULL);
|
||||
_set_colour(maintextme_val, &colour_prefs.maintextme, COLOR_WHITE);
|
||||
g_free(maintextme_val);
|
||||
|
||||
gchar *maintextthem_val = g_key_file_get_string(theme, "colours", "main.text.them", NULL);
|
||||
_set_colour(maintextthem_val, &colour_prefs.maintextthem, COLOR_WHITE);
|
||||
g_free(maintextthem_val);
|
||||
|
||||
gchar *splashtext_val = g_key_file_get_string(theme, "colours", "main.splash", NULL);
|
||||
_set_colour(splashtext_val, &colour_prefs.splashtext, COLOR_CYAN);
|
||||
g_free(splashtext_val);
|
||||
|
@ -45,40 +45,42 @@
|
||||
#endif
|
||||
|
||||
#define COLOUR_TEXT COLOR_PAIR(1)
|
||||
#define COLOUR_SPLASH COLOR_PAIR(2)
|
||||
#define COLOUR_ERROR COLOR_PAIR(3)
|
||||
#define COLOUR_INCOMING COLOR_PAIR(4)
|
||||
#define COLOUR_INPUT_TEXT COLOR_PAIR(5)
|
||||
#define COLOUR_TIME COLOR_PAIR(6)
|
||||
#define COLOUR_TITLE_TEXT COLOR_PAIR(7)
|
||||
#define COLOUR_TITLE_BRACKET COLOR_PAIR(8)
|
||||
#define COLOUR_TITLE_UNENCRYPTED COLOR_PAIR(9)
|
||||
#define COLOUR_TITLE_ENCRYPTED COLOR_PAIR(10)
|
||||
#define COLOUR_TITLE_UNTRUSTED COLOR_PAIR(11)
|
||||
#define COLOUR_TITLE_TRUSTED COLOR_PAIR(12)
|
||||
#define COLOUR_STATUS_TEXT COLOR_PAIR(13)
|
||||
#define COLOUR_STATUS_BRACKET COLOR_PAIR(14)
|
||||
#define COLOUR_STATUS_ACTIVE COLOR_PAIR(15)
|
||||
#define COLOUR_STATUS_NEW COLOR_PAIR(16)
|
||||
#define COLOUR_ME COLOR_PAIR(17)
|
||||
#define COLOUR_THEM COLOR_PAIR(18)
|
||||
#define COLOUR_ROOMINFO COLOR_PAIR(19)
|
||||
#define COLOUR_ROOMMENTION COLOR_PAIR(20)
|
||||
#define COLOUR_ONLINE COLOR_PAIR(21)
|
||||
#define COLOUR_OFFLINE COLOR_PAIR(22)
|
||||
#define COLOUR_AWAY COLOR_PAIR(23)
|
||||
#define COLOUR_CHAT COLOR_PAIR(24)
|
||||
#define COLOUR_DND COLOR_PAIR(25)
|
||||
#define COLOUR_XA COLOR_PAIR(26)
|
||||
#define COLOUR_TYPING COLOR_PAIR(27)
|
||||
#define COLOUR_GONE COLOR_PAIR(28)
|
||||
#define COLOUR_SUBSCRIBED COLOR_PAIR(29)
|
||||
#define COLOUR_UNSUBSCRIBED COLOR_PAIR(30)
|
||||
#define COLOUR_OTR_STARTED_TRUSTED COLOR_PAIR(31)
|
||||
#define COLOUR_OTR_STARTED_UNTRUSTED COLOR_PAIR(32)
|
||||
#define COLOUR_OTR_ENDED COLOR_PAIR(33)
|
||||
#define COLOUR_OTR_TRUSTED COLOR_PAIR(34)
|
||||
#define COLOUR_OTR_UNTRUSTED COLOR_PAIR(35)
|
||||
#define COLOUR_TEXT_ME COLOR_PAIR(2)
|
||||
#define COLOUR_TEXT_THEM COLOR_PAIR(3)
|
||||
#define COLOUR_SPLASH COLOR_PAIR(4)
|
||||
#define COLOUR_ERROR COLOR_PAIR(5)
|
||||
#define COLOUR_INCOMING COLOR_PAIR(6)
|
||||
#define COLOUR_INPUT_TEXT COLOR_PAIR(7)
|
||||
#define COLOUR_TIME COLOR_PAIR(8)
|
||||
#define COLOUR_TITLE_TEXT COLOR_PAIR(9)
|
||||
#define COLOUR_TITLE_BRACKET COLOR_PAIR(10)
|
||||
#define COLOUR_TITLE_UNENCRYPTED COLOR_PAIR(11)
|
||||
#define COLOUR_TITLE_ENCRYPTED COLOR_PAIR(12)
|
||||
#define COLOUR_TITLE_UNTRUSTED COLOR_PAIR(13)
|
||||
#define COLOUR_TITLE_TRUSTED COLOR_PAIR(14)
|
||||
#define COLOUR_STATUS_TEXT COLOR_PAIR(15)
|
||||
#define COLOUR_STATUS_BRACKET COLOR_PAIR(16)
|
||||
#define COLOUR_STATUS_ACTIVE COLOR_PAIR(17)
|
||||
#define COLOUR_STATUS_NEW COLOR_PAIR(18)
|
||||
#define COLOUR_ME COLOR_PAIR(19)
|
||||
#define COLOUR_THEM COLOR_PAIR(20)
|
||||
#define COLOUR_ROOMINFO COLOR_PAIR(21)
|
||||
#define COLOUR_ROOMMENTION COLOR_PAIR(22)
|
||||
#define COLOUR_ONLINE COLOR_PAIR(23)
|
||||
#define COLOUR_OFFLINE COLOR_PAIR(24)
|
||||
#define COLOUR_AWAY COLOR_PAIR(25)
|
||||
#define COLOUR_CHAT COLOR_PAIR(26)
|
||||
#define COLOUR_DND COLOR_PAIR(27)
|
||||
#define COLOUR_XA COLOR_PAIR(28)
|
||||
#define COLOUR_TYPING COLOR_PAIR(29)
|
||||
#define COLOUR_GONE COLOR_PAIR(30)
|
||||
#define COLOUR_SUBSCRIBED COLOR_PAIR(31)
|
||||
#define COLOUR_UNSUBSCRIBED COLOR_PAIR(32)
|
||||
#define COLOUR_OTR_STARTED_TRUSTED COLOR_PAIR(33)
|
||||
#define COLOUR_OTR_STARTED_UNTRUSTED COLOR_PAIR(34)
|
||||
#define COLOUR_OTR_ENDED COLOR_PAIR(35)
|
||||
#define COLOUR_OTR_TRUSTED COLOR_PAIR(36)
|
||||
#define COLOUR_OTR_UNTRUSTED COLOR_PAIR(37)
|
||||
|
||||
void theme_init(const char * const theme_name);
|
||||
void theme_init_colours(void);
|
||||
|
Loading…
Reference in New Issue
Block a user