1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Added time to themes, and some example themes

This commit is contained in:
James Booth 2012-11-22 02:34:49 +00:00
parent c5b4fc4a80
commit 45a26b111f
10 changed files with 151 additions and 0 deletions

View File

@ -70,6 +70,7 @@ static struct colours_t {
NCURSES_COLOR_T statusbarnew;
NCURSES_COLOR_T maintext;
NCURSES_COLOR_T inputtext;
NCURSES_COLOR_T timetext;
NCURSES_COLOR_T splashtext;
NCURSES_COLOR_T online;
NCURSES_COLOR_T away;
@ -158,6 +159,7 @@ theme_init_colours(void)
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);
// title bar
init_pair(10, colour_prefs.titlebartext, colour_prefs.titlebar);
@ -257,6 +259,9 @@ _load_colours(void)
gchar *inputtext_val = g_key_file_get_string(theme, "colours", "inputtext", NULL);
_set_colour(inputtext_val, &colour_prefs.inputtext, COLOR_WHITE);
gchar *timetext_val = g_key_file_get_string(theme, "colours", "timetext", NULL);
_set_colour(timetext_val, &colour_prefs.timetext, COLOR_WHITE);
gchar *online_val = g_key_file_get_string(theme, "colours", "online", NULL);
_set_colour(online_val, &colour_prefs.online, COLOR_GREEN);

View File

@ -39,6 +39,7 @@
#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(10)
#define COLOUR_TITLE_BRACKET COLOR_PAIR(11)
#define COLOUR_STATUS_TEXT COLOR_PAIR(20)

View File

@ -393,7 +393,9 @@ win_show_incomming_msg(const char * const from, const char * const message,
} else {
GDateTime *time = g_date_time_new_from_timeval_utc(tv_stamp);
gchar *date_fmt = g_date_time_format(time, "%H:%M:%S");
wattron(win, COLOUR_TIME);
wprintw(win, "%s - ", date_fmt);
wattroff(win, COLOUR_TIME);
g_date_time_unref(time);
g_free(date_fmt);
}
@ -430,7 +432,9 @@ win_show_incomming_msg(const char * const from, const char * const message,
} else {
GDateTime *time = g_date_time_new_from_timeval_utc(tv_stamp);
gchar *date_fmt = g_date_time_format(time, "%H:%M:%S");
wattron(win, COLOUR_TIME);
wprintw(win, "%s - ", date_fmt);
wattroff(win, COLOUR_TIME);
g_date_time_unref(time);
g_free(date_fmt);
}
@ -1521,7 +1525,9 @@ _win_show_time(WINDOW *win)
{
GDateTime *time = g_date_time_new_now_local();
gchar *date_fmt = g_date_time_format(time, "%H:%M:%S");
wattron(win, COLOUR_TIME);
wprintw(win, "%s - ", date_fmt);
wattroff(win, COLOUR_TIME);
g_date_time_unref(time);
g_free(date_fmt);
}

27
themes/aqua Normal file
View File

@ -0,0 +1,27 @@
[colours]
bkgnd=default
titlebar=blue
statusbar=blue
titlebartext=white
titlebarbrackets=white
statusbartext=white
statusbarbrackets=white
statusbaractive=cyan
statusbarnew=white
maintext=blue
inputtext=white
timetext=cyan
splashtext=white
online=white
away=cyan
chat=white
dnd=blue
xa=cyan
offline=blue
typing=white
gone=blue
error=white
incoming=white
roominfo=white
me=white
them=cyan

27
themes/hacker Normal file
View File

@ -0,0 +1,27 @@
[colours]
bkgnd=default
titlebar=green
statusbar=green
titlebartext=black
titlebarbrackets=black
statusbartext=black
statusbarbrackets=black
statusbaractive=black
statusbarnew=black
maintext=green
inputtext=green
timetext=green
splashtext=green
online=green
away=green
chat=green
dnd=green
xa=green
offline=green
typing=green
gone=green
error=red
incoming=green
roominfo=green
me=green
them=green

27
themes/headache Normal file
View File

@ -0,0 +1,27 @@
[colours]
bkgnd=default
titlebar=magenta
statusbar=default
titlebartext=white
titlebarbrackets=white
statusbartext=white
statusbarbrackets=red
statusbaractive=cyan
statusbarnew=white
maintext=blue
inputtext=yellow
timetext=green
splashtext=red
online=red
away=cyan
chat=green
dnd=megenta
xa=cyan
offline=green
typing=magenta
gone=yellow
error=red
incoming=yellow
roominfo=white
me=white
them=white

27
themes/original Normal file
View File

@ -0,0 +1,27 @@
[colours]
bkgnd=default
titlebar=blue
statusbar=blue
titlebartext=white
titlebarbrackets=cyan
statusbartext=white
statusbarbrackets=cyan
statusbaractive=cyan
statusbarnew=white
maintext=white
inputtext=white
timetext=white
splashtext=cyan
online=green
away=cyan
chat=green
dnd=red
xa=cyan
offline=red
typing=yellow
gone=red
error=red
incoming=yellow
roominfo=yellow
me=yellow
them=green

2
themes/redsplash Normal file
View File

@ -0,0 +1,2 @@
[colours]
splashtext=red

27
themes/whiteness Normal file
View File

@ -0,0 +1,27 @@
[colours]
bkgnd=white
titlebar=blue
statusbar=blue
titlebartext=white
titlebarbrackets=white
statusbartext=white
statusbarbrackets=white
statusbaractive=megenta
statusbarnew=red
maintext=black
inputtext=black
timetext=black
splashtext=black
online=green
away=cyan
chat=green
dnd=red
xa=cyan
offline=red
typing=yellow
gone=red
error=red
incoming=yellow
roominfo=yellow
me=yellow
them=green

2
themes/yellowsplash Normal file
View File

@ -0,0 +1,2 @@
[colours]
splashtext=yellow