diff --git a/config.c b/config.c index ef7f9a25..158eabec 100644 --- a/config.c +++ b/config.c @@ -350,7 +350,7 @@ parse_section_csd(const char *key, const char *value, struct config *conf, } } - else if (strcmp(key, "titlebar-color") == 0) { + else if (strcmp(key, "color") == 0) { uint32_t color; if (!str_to_color(value, &color, true, path, lineno)) { LOG_ERR("%s:%d: invalid titlebar-color: %s", path, lineno, value); @@ -361,18 +361,7 @@ parse_section_csd(const char *key, const char *value, struct config *conf, conf->csd.color.title = color; } - else if (strcmp(key, "border-color") == 0) { - uint32_t color; - if (!str_to_color(value, &color, true, path, lineno)) { - LOG_ERR("%s:%d: invalid border-color: %s", path, lineno, value); - return false; - } - - conf->csd.color.border_set = true; - conf->csd.color.border = color; - } - - else if (strcmp(key, "titlebar-size") == 0) { + else if (strcmp(key, "size") == 0) { unsigned long pixels; if (!str_to_ulong(value, 10, &pixels)) { LOG_ERR("%s:%d: expected an integer: %s", path, lineno, value); @@ -382,16 +371,6 @@ parse_section_csd(const char *key, const char *value, struct config *conf, conf->csd.title_height = pixels; } - else if (strcmp(key, "border-width") == 0) { - unsigned long pixels; - if (!str_to_ulong(value, 10, &pixels)) { - LOG_ERR("%s:%d: expected an integer: %s", path, lineno, value); - return false; - } - - conf->csd.border_width = pixels; - } - else if (strcmp(key, "button-width") == 0) { unsigned long pixels; if (!str_to_ulong(value, 10, &pixels)) { @@ -645,10 +624,6 @@ config_load(struct config *conf, const char *conf_path) .title_height = 26, .border_width = 5, .button_width = 22, - .color = { - .title_set = false, - .border_set = false, - }, }, .render_worker_count = sysconf(_SC_NPROCESSORS_ONLN), diff --git a/config.h b/config.h index dd34c589..a89637e1 100644 --- a/config.h +++ b/config.h @@ -45,12 +45,10 @@ struct config { struct { bool title_set; - bool border_set; bool minimize_set; bool maximize_set; bool close_set; uint32_t title; - uint32_t border; uint32_t minimize; uint32_t maximize; uint32_t close; diff --git a/doc/foot.5.scd b/doc/foot.5.scd index 3d775cb5..69c6f385 100644 --- a/doc/foot.5.scd +++ b/doc/foot.5.scd @@ -126,23 +126,16 @@ component. compositor. Depending on the compositor's configuration and capabilities, it may not have any effect. Default: _server_. -*titlebar-size* - Height, in pixels (but subject to output scaling), of the - titlebar, not including the window border. Default: _26_. +*size* + Height, in pixels (subject to output scaling), of the + titlebar. Default: _26_. -*border-width* - Width, in pixels (but subject to output scaling), of the - borders. Default: _5_. - -*titlebar-color* +*color* Titlebar AARRGGBB color. Default: use the default _foreground_ color. -*border-color* - Border AARRGGBB color. Default: _transparent_. - *button-width* - Width, in pixels (but subject to output scaling), of the + Width, in pixels (subject to output scaling), of the minimize/maximize/close buttons. Default: _22_. *button-minimize-color* diff --git a/footrc b/footrc index a9bce529..e2799fdd 100644 --- a/footrc +++ b/footrc @@ -36,10 +36,8 @@ [csd] # preferred=server -# titlebar-size=26 -# border-width=5 -# titlebar-color= -# border-color=00000000 +# size=26 +# color= # button-width=22 # button-minimize-color=ff0000ff # button-maximize-color=ff00ff00 diff --git a/render.c b/render.c index 52c80e08..b422ef93 100644 --- a/render.c +++ b/render.c @@ -779,17 +779,7 @@ render_csd_border(struct terminal *term, enum csd_surface surf_idx) struct buffer *buf = shm_get_buffer( term->wl->shm, info.width, info.height, cookie); - uint32_t _color = 0; - uint16_t alpha = 0; - - if (term->conf->csd.color.border_set) { - _color = term->conf->csd.color.border; - alpha = _color >> 24 | (_color >> 24 << 8); - } - - pixman_color_t color = color_hex_to_pixman_with_alpha(_color, alpha); - if (!term->visual_focus) - pixman_color_dim(&color); + pixman_color_t color = color_hex_to_pixman_with_alpha(0, 0); render_csd_part(term, surf, buf, info.width, info.height, &color); csd_commit(term, surf, buf); }