aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-05-20 07:03:29 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-05-20 07:17:42 +0000
commitc4f13809430e7086fb6a0f2c80930a7537c7175d (patch)
tree62eb949fc59ba16e4bb1f95f63103d2097cf3f13 /config.c
parentthemes: add onehalf-dark (diff)
config: add cursor.blink-rate option
The default is 500ms, which corresponds to the old, hardcoded default. Closes #1707
Diffstat (limited to 'config.c')
-rw-r--r--config.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/config.c b/config.c
index d63934b3..b7bc1f09 100644
--- a/config.c
+++ b/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,