mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
bartabgroups: show title for hidden floating windows, added option to show always show title for floating windows
This commit is contained in:
parent
de47bd8839
commit
ed2b8c27c8
@ -28,10 +28,8 @@ bartabdraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg
|
|||||||
drw_setscheme(drw, scheme[
|
drw_setscheme(drw, scheme[
|
||||||
m->sel == c
|
m->sel == c
|
||||||
? SchemeSel
|
? SchemeSel
|
||||||
#if BAR_WINTITLEACTIONS_PATCH
|
|
||||||
: HIDDEN(c)
|
: HIDDEN(c)
|
||||||
? SchemeHid
|
? SchemeHid
|
||||||
#endif // BAR_WINTITLEACTIONS_PATCH
|
|
||||||
: groupactive
|
: groupactive
|
||||||
? SchemeTabActive
|
? SchemeTabActive
|
||||||
: SchemeTabInactive
|
: SchemeTabInactive
|
||||||
@ -95,7 +93,7 @@ bartabcalculate(
|
|||||||
for (i = 0, c = m->clients; c; c = c->next) {
|
for (i = 0, c = m->clients; c; c = c->next) {
|
||||||
if (!ISVISIBLE(c))
|
if (!ISVISIBLE(c))
|
||||||
continue;
|
continue;
|
||||||
if (c->isfloating) {
|
if (!HIDDEN(c) && c->isfloating && !BARTAB_SHOWFLOATING) {
|
||||||
clientsnfloating++;
|
clientsnfloating++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -133,7 +131,7 @@ bartabcalculate(
|
|||||||
r = num % den;
|
r = num % den;
|
||||||
w = num / den;
|
w = num / den;
|
||||||
for (c = m->clients, i = 0; c; c = c->next) {
|
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;
|
continue;
|
||||||
tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg);
|
tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg);
|
||||||
x += w + (i < r ? 1 : 0);
|
x += w + (i < r ? 1 : 0);
|
||||||
@ -147,7 +145,7 @@ bartabcalculate(
|
|||||||
r = num % den;
|
r = num % den;
|
||||||
w = num / den;
|
w = num / den;
|
||||||
for (c = m->clients, i = 0; c && i < m->nmaster; c = c->next) {
|
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;
|
continue;
|
||||||
tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg);
|
tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg);
|
||||||
x += w + (i < r ? 1 : 0);
|
x += w + (i < r ? 1 : 0);
|
||||||
@ -160,7 +158,7 @@ bartabcalculate(
|
|||||||
r = num % den;
|
r = num % den;
|
||||||
w = num / den;
|
w = num / den;
|
||||||
for (; c; c = c->next) {
|
for (; c; c = c->next) {
|
||||||
if (!ISVISIBLE(c) || c->isfloating)
|
if (!ISVISIBLE(c) || (!HIDDEN(c) && c->isfloating && !BARTAB_SHOWFLOATING))
|
||||||
continue;
|
continue;
|
||||||
tabfn(m, c, passx, x, w + (i - m->nmaster < r ? 1 : 0), tgactive, arg);
|
tabfn(m, c, passx, x, w + (i - m->nmaster < r ? 1 : 0), tgactive, arg);
|
||||||
x += w + (i - m->nmaster < r ? 1 : 0);
|
x += w + (i - m->nmaster < r ? 1 : 0);
|
||||||
|
@ -11,6 +11,9 @@
|
|||||||
#ifndef BARTAB_TAGSROWS
|
#ifndef BARTAB_TAGSROWS
|
||||||
#define BARTAB_TAGSROWS 3 // # rows in tag grid (9 tags, e.g. 3x3)
|
#define BARTAB_TAGSROWS 3 // # rows in tag grid (9 tags, e.g. 3x3)
|
||||||
#endif
|
#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 width_bartabgroups(Bar *bar, BarWidthArg *a);
|
||||||
static int draw_bartabgroups(Bar *bar, BarDrawArg *a);
|
static int draw_bartabgroups(Bar *bar, BarDrawArg *a);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user