set scrollback_lines via config
This commit is contained in:
parent
abf580c186
commit
a5cfc12864
2
config.h
2
config.h
|
@ -12,8 +12,6 @@ static const char *url_regex = "(ftp|http)s?://[-a-zA-Z0-9.?$%&/=_~#.,:;+]*";
|
|||
// 0.0: opaque, 1.0: transparent
|
||||
//#define TRANSPARENCY 0.2
|
||||
|
||||
static const long scrollback_lines = 1000;
|
||||
|
||||
static const char *foreground_color = "#dcdccc";
|
||||
static const char *background_color = "#3f3f3f";
|
||||
static const char *cursor_color = "#dcdccc";
|
||||
|
|
|
@ -288,6 +288,11 @@ static void load_config(GtkWindow *window, VteTerminal *vte) {
|
|||
IGNORE_ON_ERROR(error) {
|
||||
vte_terminal_set_font_from_string(vte, font);
|
||||
}
|
||||
|
||||
gint scrollback_lines = g_key_file_get_integer(config, "options", "scrollback_lines", &error);
|
||||
IGNORE_ON_ERROR(error) {
|
||||
vte_terminal_set_scrollback_lines(vte, scrollback_lines);
|
||||
}
|
||||
}
|
||||
g_key_file_free(config);
|
||||
}
|
||||
|
@ -381,7 +386,6 @@ int main(int argc, char **argv) {
|
|||
|
||||
load_config(GTK_WINDOW(window), VTE_TERMINAL(vte));
|
||||
|
||||
vte_terminal_set_scrollback_lines(VTE_TERMINAL(vte), scrollback_lines);
|
||||
vte_terminal_set_cursor_shape(VTE_TERMINAL(vte), CONCAT2(VTE_CURSOR_SHAPE_, CURSOR_SHAPE));
|
||||
vte_terminal_set_cursor_blink_mode(VTE_TERMINAL(vte), CONCAT2(VTE_CURSOR_BLINK_, CURSOR_BLINK));
|
||||
|
||||
|
|
|
@ -6,3 +6,4 @@ audible_bell = false
|
|||
visible_bell = false
|
||||
mouse_autohide = false
|
||||
font = Monospace 9
|
||||
scrollback_lines = 1000
|
||||
|
|
Loading…
Reference in New Issue