From ed2b8c27c856b16b202e3ba4c5ee593bcd391465 Mon Sep 17 00:00:00 2001 From: bakkeby Date: Sat, 15 Aug 2020 07:44:41 +0200 Subject: [PATCH] bartabgroups: show title for hidden floating windows, added option to show always show title for floating windows --- patch/bar_tabgroups.c | 10 ++++------ patch/bar_tabgroups.h | 3 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/patch/bar_tabgroups.c b/patch/bar_tabgroups.c index c5a0e43..7eeb83d 100644 --- a/patch/bar_tabgroups.c +++ b/patch/bar_tabgroups.c @@ -28,10 +28,8 @@ bartabdraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg drw_setscheme(drw, scheme[ m->sel == c ? SchemeSel - #if BAR_WINTITLEACTIONS_PATCH : HIDDEN(c) ? SchemeHid - #endif // BAR_WINTITLEACTIONS_PATCH : groupactive ? SchemeTabActive : SchemeTabInactive @@ -95,7 +93,7 @@ bartabcalculate( for (i = 0, c = m->clients; c; c = c->next) { if (!ISVISIBLE(c)) continue; - if (c->isfloating) { + if (!HIDDEN(c) && c->isfloating && !BARTAB_SHOWFLOATING) { clientsnfloating++; continue; } @@ -133,7 +131,7 @@ bartabcalculate( r = num % den; w = num / den; for (c = m->clients, i = 0; c; c = c->next) { - if (!ISVISIBLE(c) || c->isfloating) + if (!ISVISIBLE(c) || (!HIDDEN(c) && c->isfloating && !BARTAB_SHOWFLOATING)) continue; tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg); x += w + (i < r ? 1 : 0); @@ -147,7 +145,7 @@ bartabcalculate( r = num % den; w = num / den; for (c = m->clients, i = 0; c && i < m->nmaster; c = c->next) { - if (!ISVISIBLE(c) || c->isfloating) + if (!ISVISIBLE(c) || (!HIDDEN(c) && c->isfloating && !BARTAB_SHOWFLOATING)) continue; tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg); x += w + (i < r ? 1 : 0); @@ -160,7 +158,7 @@ bartabcalculate( r = num % den; w = num / den; for (; c; c = c->next) { - if (!ISVISIBLE(c) || c->isfloating) + if (!ISVISIBLE(c) || (!HIDDEN(c) && c->isfloating && !BARTAB_SHOWFLOATING)) continue; tabfn(m, c, passx, x, w + (i - m->nmaster < r ? 1 : 0), tgactive, arg); x += w + (i - m->nmaster < r ? 1 : 0); diff --git a/patch/bar_tabgroups.h b/patch/bar_tabgroups.h index 7cf1254..421b3bf 100644 --- a/patch/bar_tabgroups.h +++ b/patch/bar_tabgroups.h @@ -11,6 +11,9 @@ #ifndef BARTAB_TAGSROWS #define BARTAB_TAGSROWS 3 // # rows in tag grid (9 tags, e.g. 3x3) #endif +#ifndef BARTAB_SHOWFLOATING +#define BARTAB_SHOWFLOATING 0 // whether to show titles for floating windows, hidden clients are always shown +#endif static int width_bartabgroups(Bar *bar, BarWidthArg *a); static int draw_bartabgroups(Bar *bar, BarDrawArg *a);