mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-14 05:33:59 -04:00
config: add cursor.blink-rate option
The default is 500ms, which corresponds to the old, hardcoded default. Closes #1707
This commit is contained in:
parent
bc193c7be5
commit
c4f1380943
7 changed files with 37 additions and 11 deletions
10
config.c
10
config.c
|
|
@ -1395,7 +1395,10 @@ parse_section_cursor(struct context *ctx)
|
|||
}
|
||||
|
||||
else if (streq(key, "blink"))
|
||||
return value_to_bool(ctx, &conf->cursor.blink);
|
||||
return value_to_bool(ctx, &conf->cursor.blink.enabled);
|
||||
|
||||
else if (streq(key, "blink-rate"))
|
||||
return value_to_uint32(ctx, 10, &conf->cursor.blink.rate_ms);
|
||||
|
||||
else if (streq(key, "color")) {
|
||||
if (!value_to_two_colors(
|
||||
|
|
@ -3102,7 +3105,10 @@ config_load(struct config *conf, const char *conf_path,
|
|||
.cursor = {
|
||||
.style = CURSOR_BLOCK,
|
||||
.unfocused_style = CURSOR_UNFOCUSED_HOLLOW,
|
||||
.blink = false,
|
||||
.blink = {
|
||||
.enabled = false,
|
||||
.rate_ms = 500,
|
||||
},
|
||||
.color = {
|
||||
.text = 0,
|
||||
.cursor = 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue