diff --git a/src/barwin.c b/src/barwin.c index 78c0caf..a9cb568 100644 --- a/src/barwin.c +++ b/src/barwin.c @@ -31,7 +31,6 @@ */ #include "wmfs.h" -#include "color.h" /** Create a BarWindow * \param parent Parent window of the BarWindow @@ -96,8 +95,8 @@ barwin_create(Window parent, bw->geo.height = h; bw->bg = bg; bw->fg = fg; - bw->border.light = color_shade(bg, 0.10); - bw->border.dark = color_shade(bg, -0.10); + bw->border.light = color_shade(bg, conf.colors.bar_light_shade); + bw->border.dark = color_shade(bg, conf.colors.bar_dark_shade); bw->stipple = stipple; bw->stipple_color = -1; diff --git a/src/config.c b/src/config.c index d820988..d45e5a0 100644 --- a/src/config.c +++ b/src/config.c @@ -203,6 +203,9 @@ conf_bar_section(void) conf.colors.bar = getcolor((barbg = fetch_opt_first(bar, "#000000", "bg").str)); conf.colors.text = fetch_opt_first(bar, "#ffffff", "fg").str; + conf.colors.bar_light_shade = fetch_opt_first(bar, "0.25", "light_shade").fnum; + conf.colors.bar_dark_shade = fetch_opt_first(bar, "-0.25", "dark_shade").fnum; + mouse = fetch_section(bar, "mouse"); if ((conf.bars.nmouse = fetch_section_count(mouse)) > 0) @@ -301,6 +304,9 @@ conf_client_section(void) conf.client.default_open_screen = fetch_opt_first(sec, "-1", "default_open_screen").num; conf.client.new_client_get_mouse = fetch_opt_first(sec, "false", "new_client_get_mouse").bool; + conf.colors.client_light_shade = fetch_opt_first(bar, "0.25", "light_shade").fnum; + conf.colors.client_dark_shade = fetch_opt_first(bar, "-0.25", "dark_shade").fnum; + mouse = fetch_section(sec, "mouse"); if((conf.client.nmouse = fetch_section_count(mouse)) > 0) diff --git a/src/frame.c b/src/frame.c index 61e6eaa..22d7ff8 100644 --- a/src/frame.c +++ b/src/frame.c @@ -258,10 +258,10 @@ frame_update(Client *c) if(conf.client.border_shadow) { - XSetWindowBackground(dpy, c->left, color_shade(c->colors.frame, 0.01)); - XSetWindowBackground(dpy, c->top, color_shade(c->colors.frame, 0.01)); - XSetWindowBackground(dpy, c->right, color_shade(c->colors.frame, -0.01)); - XSetWindowBackground(dpy, c->bottom, color_shade(c->colors.frame, -0.01)); + XSetWindowBackground(dpy, c->left, color_shade(c->colors.frame, conf.colors.client_light_shade)); + XSetWindowBackground(dpy, c->top, color_shade(c->colors.frame, conf.colors.client_light_shade)); + XSetWindowBackground(dpy, c->right, color_shade(c->colors.frame, conf.colors.client_dark_shade)); + XSetWindowBackground(dpy, c->bottom, color_shade(c->colors.frame, conf.colors.client_dark_shade)); XClearWindow(dpy, c->left); XClearWindow(dpy, c->top); diff --git a/src/structs.h b/src/structs.h index 1ee0aa9..272795d 100644 --- a/src/structs.h +++ b/src/structs.h @@ -216,6 +216,10 @@ struct Client uint frame; char *fg; uint resizecorner; + float client_light_shade; + float client_dark_shade; + float bar_light_shade; + float bar_dark_shade; } colors; /* Client Information by flags */ uint flags;