diff --git a/docs/example.Xresources b/docs/example.Xresources index 2ea0c42..0a3bedd 100644 --- a/docs/example.Xresources +++ b/docs/example.Xresources @@ -92,10 +92,6 @@ !! !! -/ Color options \- !! -!! Color the unselected title (0/1) -!! - - speedwm.colortitle: 1 -!! !! Color the selected title. !! Note that if you use the powerline then this may look nicer if its disabled. (0/1) !! diff --git a/speedwm.c b/speedwm.c index c841a99..0ef8150 100644 --- a/speedwm.c +++ b/speedwm.c @@ -2379,21 +2379,28 @@ resizebarwin(m); } /* selected clients */ - if (m->sel == c && colorselectedtitle) - scm = SchemeTitleSel; + if (m->sel == c && colorselectedtitle) { + scm = SchemeTitleSel; /* hidden clients */ - if (HIDDEN(c) && colorhiddentitle) - if (!hideunselectedtitle) + } else if (HIDDEN(c) && colorhiddentitle) { scm = SchemeTitleHidden; /* unselected clients */ - if (colortitle) - if (!colorselectedtitle) + } else { scm = SchemeTitleNorm; - - /* set the scheme */ - drw_setscheme(drw, scheme[scm]); + } + + /* apply colors */ + if (!hideunselectedtitle) { + if (colorselectedtitle) { + drw_setscheme(drw, scheme[scm]); + } + } else { + if (colorselectedtitle) { + drw_setscheme(drw, scheme[SchemeTitleSel]); + } + } /* we don't need this if we're only printing focused */ if (!hideunselectedtitle) { diff --git a/xresources.h b/xresources.h index a0f95d9..3ff60fc 100644 --- a/xresources.h +++ b/xresources.h @@ -175,7 +175,6 @@ ResourcePref resources[] = { { "menupositionh", INTEGER, &menupositionh }, { "maxwidth", INTEGER, &maxwidth }, { "maxheight", INTEGER, &maxheight }, - { "colortitle", INTEGER, &colortitle }, { "colorselectedtitle", INTEGER, &colorselectedtitle }, { "colorhiddentitle", INTEGER, &colorhiddentitle }, { "colorlayout", INTEGER, &colorlayout },