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 options \-
!! !!
!! Color the unselected title (0/1)
!!
- speedwm.colortitle: 1
!!
!! Color the selected title. !! Color the selected title.
!! Note that if you use the powerline then this may look nicer if its disabled. (0/1) !! 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 */ /* selected clients */
if (m->sel == c && colorselectedtitle) if (m->sel == c && colorselectedtitle) {
scm = SchemeTitleSel; scm = SchemeTitleSel;
/* hidden clients */ /* hidden clients */
if (HIDDEN(c) && colorhiddentitle) } else if (HIDDEN(c) && colorhiddentitle) {
if (!hideunselectedtitle)
scm = SchemeTitleHidden; scm = SchemeTitleHidden;
/* unselected clients */ /* unselected clients */
if (colortitle) } else {
if (!colorselectedtitle)
scm = SchemeTitleNorm; 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 */ /* we don't need this if we're only printing focused */
if (!hideunselectedtitle) { if (!hideunselectedtitle) {

View file

@ -175,7 +175,6 @@ ResourcePref resources[] = {
{ "menupositionh", INTEGER, &menupositionh }, { "menupositionh", INTEGER, &menupositionh },
{ "maxwidth", INTEGER, &maxwidth }, { "maxwidth", INTEGER, &maxwidth },
{ "maxheight", INTEGER, &maxheight }, { "maxheight", INTEGER, &maxheight },
{ "colortitle", INTEGER, &colortitle },
{ "colorselectedtitle", INTEGER, &colorselectedtitle }, { "colorselectedtitle", INTEGER, &colorselectedtitle },
{ "colorhiddentitle", INTEGER, &colorhiddentitle }, { "colorhiddentitle", INTEGER, &colorhiddentitle },
{ "colorlayout", INTEGER, &colorlayout }, { "colorlayout", INTEGER, &colorlayout },