aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-11-24 12:57:05 +0100
committerFederico Angelilli <code@fedang.net>2024-11-24 12:57:05 +0100
commitb260d5beb9fab0c39f18be677e70b35e988d3c1d (patch)
tree1654463c878f17130d52ea6c99c725d0fbacc754 /src/config.c
parent57f91ef34cb8a8a1db2c18b468165a4273f13fa8 (diff)
Scale surfaces properly
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index ce34e55..13addef 100644
--- a/src/config.c
+++ b/src/config.c
@@ -27,6 +27,7 @@ static const config_entry_t bar_entries[] = {
{ "monitor", CONFIG_STRING, NULL, offsetof(config_t, monitor) },
{ "override-redirect", CONFIG_BOOL, NULL, offsetof(config_t, override_redirect) },
{ "background", CONFIG_GRADIENT, NULL, offsetof(config_t, background) },
+ { "scale", CONFIG_DOUBLE, NULL, offsetof(config_t, scale) },
{ 0 },
};
@@ -594,7 +595,10 @@ int config_validate(config_t *config)
int errors = 0;
// Validate the config itself
- // ...
+ if (config->scale < 1 && config->scale != 0) {
+ log_error("Bar '%s' should be at least 1", "scale");
+ errors++;
+ }
// Validate blocks
for (size_t i = 0; i < config->n_blocks; i++) {