diff --git a/data/themerc b/data/themerc index a413a14a..c698a50d 100644 --- a/data/themerc +++ b/data/themerc @@ -1 +1,4 @@ window.active.title.bg.color: #589bda +window.active.handle.bg.color: #3c7cb7 + +window.inactive.title.bg.color: #efece6 diff --git a/include/theme.h b/include/theme.h index a6b5d125..ed39a092 100644 --- a/include/theme.h +++ b/include/theme.h @@ -5,6 +5,8 @@ struct theme { float window_active_title_bg_color[4]; + float window_active_handle_bg_color[4]; + float window_inactive_title_bg_color[4]; }; extern struct theme theme; diff --git a/src/output.c b/src/output.c index eec3ce08..35197dcd 100644 --- a/src/output.c +++ b/src/output.c @@ -2,8 +2,6 @@ #include "rcxml.h" #include "theme.h" -static float window_active_handle_bg[] = { 0.21, 0.49, 0.71, 1.0 }; - struct draw_data { struct wlr_renderer *renderer; float *transform_matrix; @@ -48,7 +46,7 @@ static void render_decorations(struct wlr_output *output, struct view *view) .transform_matrix = output->transform_matrix, }; - ddata.rgba = window_active_handle_bg; + ddata.rgba = theme.window_active_handle_bg_color; draw_rect(&ddata, deco_box(view, LAB_DECO_PART_TOP)); draw_rect(&ddata, deco_box(view, LAB_DECO_PART_RIGHT)); draw_rect(&ddata, deco_box(view, LAB_DECO_PART_BOTTOM)); diff --git a/src/theme/theme.c b/src/theme/theme.c index 868450e3..f9951e85 100644 --- a/src/theme/theme.c +++ b/src/theme/theme.c @@ -36,6 +36,10 @@ static void entry(const char *key, const char *value) return; if (!strcmp(key, "window.active.title.bg.color")) parse_hexstr(value, theme.window_active_title_bg_color); + if (!strcmp(key, "window.active.handle.bg.color")) + parse_hexstr(value, theme.window_active_handle_bg_color); + if (!strcmp(key, "window.inactive.title.bg.color")) + parse_hexstr(value, theme.window_inactive_title_bg_color); } static void rtrim(char **s)