push changes to the title, clean code

This commit is contained in:
speediegq 2022-10-18 22:40:55 +02:00
parent 10b6c09eb6
commit f564528bc8
3 changed files with 16 additions and 14 deletions

View file

@ -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)
!!

View file

@ -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) {

View file

@ -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 },