add a setting for the cursor color
This commit is contained in:
parent
2cc781c241
commit
1e04f80965
1
config.h
1
config.h
|
@ -20,6 +20,7 @@ static const bool cursor_blink = false;
|
||||||
|
|
||||||
static const char *foreground_color = "#dcdccc";
|
static const char *foreground_color = "#dcdccc";
|
||||||
static const char *background_color = "#3f3f3f";
|
static const char *background_color = "#3f3f3f";
|
||||||
|
static const char *cursor_color = "#dcdccc";
|
||||||
|
|
||||||
static const char *colors[16] = {
|
static const char *colors[16] = {
|
||||||
"#3f3f3f", // black
|
"#3f3f3f", // black
|
||||||
|
|
|
@ -270,15 +270,17 @@ int main(int argc, char **argv) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// set colors
|
// set colors
|
||||||
GdkColor foreground, background, palette[16];
|
GdkColor foreground, background, cursor, palette[16];
|
||||||
gdk_color_parse(foreground_color, &foreground);
|
gdk_color_parse(foreground_color, &foreground);
|
||||||
gdk_color_parse(background_color, &background);
|
gdk_color_parse(background_color, &background);
|
||||||
|
gdk_color_parse(cursor_color, &cursor);
|
||||||
|
|
||||||
for (unsigned i = 0; i < 16; i++) {
|
for (unsigned i = 0; i < 16; i++) {
|
||||||
gdk_color_parse(colors[i], &palette[i]);
|
gdk_color_parse(colors[i], &palette[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
vte_terminal_set_colors(VTE_TERMINAL(vte), &foreground, &background, palette, 16);
|
vte_terminal_set_colors(VTE_TERMINAL(vte), &foreground, &background, palette, 16);
|
||||||
|
vte_terminal_set_color_cursor(VTE_TERMINAL(vte), &cursor);
|
||||||
|
|
||||||
#ifdef CLICKABLE_URL
|
#ifdef CLICKABLE_URL
|
||||||
int tmp = vte_terminal_match_add_gregex(VTE_TERMINAL(vte),
|
int tmp = vte_terminal_match_add_gregex(VTE_TERMINAL(vte),
|
||||||
|
|
Loading…
Reference in New Issue