config: add 'blink' option to cursor section in footrc

This option controls whether the default cursor should blink or
not. The default is to *not* blink.
This commit is contained in:
Daniel Eklöf 2020-06-30 17:45:34 +02:00
parent 7f65bd1c20
commit a259eda535
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
7 changed files with 19 additions and 2 deletions

View file

@ -363,6 +363,9 @@ parse_section_cursor(const char *key, const char *value, struct config *conf,
}
}
else if (strcmp(key, "blink") == 0)
conf->cursor.blink = str_to_bool(value);
else if (strcmp(key, "color") == 0) {
char *value_copy = strdup(value);
const char *text = strtok(value_copy, " ");
@ -873,6 +876,7 @@ config_load(struct config *conf, const char *conf_path)
.cursor = {
.style = CURSOR_BLOCK,
.blink = false,
.color = {
.text = 0,
.cursor = 0,