From: Reginald Kennedy Date: Wed, 24 Oct 2012 16:38:30 +0000 (+0800) Subject: Add new bar_border_unfocus[x] option. X-Git-Tag: SPECTRWM_2_1_0~18 X-Git-Url: https://code.delx.au/spectrwm/commitdiff_plain/ec0be0e55015e1a7771b668a7c659d67c696f452 Add new bar_border_unfocus[x] option. --- diff --git a/spectrwm.1 b/spectrwm.1 index 66ca98d..fbaab01 100644 --- a/spectrwm.1 +++ b/spectrwm.1 @@ -96,6 +96,9 @@ Place the statusbar at the bottom of each region instead of the top. .It Ic bar_border Ns Bq Ar x Border color of the status bar(s) in screen .Ar x . +.It Ic bar_border_unfocus Ns Bq Ar x +Border color of the status bar(s) on unfocused region(s) in screen +.Ar x . .It Ic bar_border_width Set status bar border thickness in pixels. Disable border by setting to 0. diff --git a/spectrwm.c b/spectrwm.c index 8e5e06e..7597cd4 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -520,6 +520,7 @@ struct workspace { enum { SWM_S_COLOR_BAR, SWM_S_COLOR_BAR_BORDER, + SWM_S_COLOR_BAR_BORDER_UNFOCUS, SWM_S_COLOR_BAR_FONT, SWM_S_COLOR_FOCUS, SWM_S_COLOR_UNFOCUS, @@ -2502,7 +2503,7 @@ bar_setup(struct swm_region *r) /* Assume region is unfocused when we create the bar. */ r->bar->id = xcb_generate_id(conn); wa[0] = r->s->c[SWM_S_COLOR_BAR].pixel; - wa[1] = r->s->c[SWM_S_COLOR_UNFOCUS].pixel; + wa[1] = r->s->c[SWM_S_COLOR_BAR_BORDER_UNFOCUS].pixel; wa[2] = XCB_EVENT_MASK_EXPOSURE; xcb_create_window(conn, XCB_COPY_FROM_PARENT, r->bar->id, r->s->root, @@ -3327,7 +3328,7 @@ set_region(struct swm_region *r) xcb_change_window_attributes(conn, rf->bar->id, XCB_CW_BORDER_PIXEL, - &r->s->c[SWM_S_COLOR_UNFOCUS].pixel); + &r->s->c[SWM_S_COLOR_BAR_BORDER_UNFOCUS].pixel); } /* Set region bar border to focus_color. */ @@ -7086,6 +7087,7 @@ struct config_option configopt[] = { { "bar_action", setconfvalue, SWM_S_BAR_ACTION }, { "bar_at_bottom", setconfvalue, SWM_S_BAR_AT_BOTTOM }, { "bar_border", setconfcolor, SWM_S_COLOR_BAR_BORDER }, + { "bar_border_unfocus", setconfcolor, SWM_S_COLOR_BAR_BORDER_UNFOCUS }, { "bar_border_width", setconfvalue, SWM_S_BAR_BORDER_WIDTH }, { "bar_color", setconfcolor, SWM_S_COLOR_BAR }, { "bar_delay", setconfvalue, SWM_S_BAR_DELAY }, @@ -8896,6 +8898,8 @@ setup_screens(void) setscreencolor("red", i + 1, SWM_S_COLOR_FOCUS); setscreencolor("rgb:88/88/88", i + 1, SWM_S_COLOR_UNFOCUS); setscreencolor("rgb:00/80/80", i + 1, SWM_S_COLOR_BAR_BORDER); + setscreencolor("rgb:00/40/40", i + 1, + SWM_S_COLOR_BAR_BORDER_UNFOCUS); setscreencolor("black", i + 1, SWM_S_COLOR_BAR); setscreencolor("rgb:a0/a0/a0", i + 1, SWM_S_COLOR_BAR_FONT); diff --git a/spectrwm.conf b/spectrwm.conf index 576e374..0dcb88e 100644 --- a/spectrwm.conf +++ b/spectrwm.conf @@ -21,6 +21,7 @@ # bar_enabled = 1 # bar_border_width = 1 # bar_border[1] = rgb:00/80/80 +# bar_border_unfocus[1] = rgb:00/40/40 # bar_color[1] = black # bar_font_color[1] = rgb:a0/a0/a0 # bar_font = -*-terminus-medium-*-*-*-*-*-*-*-*-*-*-*