aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-10-29 17:32:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-10-29 17:32:35 +0000
commit9a04c741a094b97f4502d4c098fca8c19cb3647b (patch)
tree1d80a04bb682eed4068413376175bcadefc1a9cc /config.c
parentmeson: install themes to $datadir/foot/themes (diff)
parentrender: csd_part: we don’t use the ‘src’ pixman image (diff)
Merge branch 'csd-border'
Diffstat (limited to 'config.c')
-rw-r--r--config.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/config.c b/config.c
index bd9ebbf2..4e772aa1 100644
--- a/config.c
+++ b/config.c
@@ -1489,7 +1489,9 @@ parse_section_csd(const char *key, const char *value, struct config *conf,
else if (strcmp(key, "size") == 0) {
unsigned long pixels;
if (!str_to_ulong(value, 10, &pixels)) {
- LOG_AND_NOTIFY_ERR("%s:%d: expected an integer, got '%s'", path, lineno, value);
+ LOG_AND_NOTIFY_ERR(
+ "%s:%d: [csd]: size: expected an integer, got '%s'",
+ path, lineno, value);
return false;
}
@@ -1499,7 +1501,9 @@ parse_section_csd(const char *key, const char *value, struct config *conf,
else if (strcmp(key, "button-width") == 0) {
unsigned long pixels;
if (!str_to_ulong(value, 10, &pixels)) {
- LOG_AND_NOTIFY_ERR("%s:%d: expected an integer, got '%s'", path, lineno, value);
+ LOG_AND_NOTIFY_ERR(
+ "%s:%d: [csd]: button-width: expected an integer, got '%s'",
+ path, lineno, value);
return false;
}
@@ -1542,6 +1546,27 @@ parse_section_csd(const char *key, const char *value, struct config *conf,
conf->csd.color.close = color;
}
+ else if (strcmp(key, "border-color") == 0) {
+ uint32_t color;
+ if (!str_to_color(value, &color, true, conf, path, lineno, "csd", "border-color"))
+ return false;
+
+ conf->csd.color.border_set = true;
+ conf->csd.color.border = color;
+ }
+
+ else if (strcmp(key, "border-width") == 0) {
+ unsigned long width;
+ if (!str_to_ulong(value, 10, &width)) {
+ LOG_AND_NOTIFY_ERR(
+ "%s:%u: [csd]: border-width: expected an integer, got '%s'",
+ path, lineno, value);
+ return false;
+ }
+
+ conf->csd.border_width_visible = width;
+ }
+
else {
LOG_AND_NOTIFY_ERR("%s:%u: [csd]: %s: invalid action",
path, lineno, key);