summaryrefslogtreecommitdiffhomepage
path: root/patch
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-09-16 11:07:23 +0200
committerbakkeby <[email protected]>2020-09-16 11:07:23 +0200
commit7275ca47ffe049fd2dbf60c606ef2cf2d909b6c6 (patch)
treef321fdab9f49c9b84ff611237f8968f729457bbe /patch
parentb8dc848918d7a07412d5fb1be74a9ac44862a028 (diff)
downloaddwm-flexipatch-7275ca47ffe049fd2dbf60c606ef2cf2d909b6c6.tar.gz
dwm-flexipatch-7275ca47ffe049fd2dbf60c606ef2cf2d909b6c6.zip
Experimenting with having more status indicators than just whether the client is floating or not
Diffstat (limited to 'patch')
-rw-r--r--patch/bar_awesomebar.c3
-rw-r--r--patch/bar_fancybar.c3
-rw-r--r--patch/bar_flexwintitle.c3
-rw-r--r--patch/bar_indicators.c27
-rw-r--r--patch/bar_indicators.h8
-rw-r--r--patch/bar_tabgroups.c3
-rw-r--r--patch/bar_wintitle.c3
-rw-r--r--patch/fakefullscreenclient.c2
8 files changed, 39 insertions, 13 deletions
diff --git a/patch/bar_awesomebar.c b/patch/bar_awesomebar.c
index 47b9eee..7a0a3dd 100644
--- a/patch/bar_awesomebar.c
+++ b/patch/bar_awesomebar.c
@@ -45,8 +45,7 @@ draw_awesomebar(Bar *bar, BarArg *a)
drw_setscheme(drw, scheme[scm]);
drw_text(drw, x, a->y, tabw + (i < remainder ? 1 : 0), a->h, pad, c->name, 0, False);
- if (c->isfloating)
- drawindicator(c->mon, c, 1, x, a->y, w, a->h, 0, 0, c->isfixed, floatindicatortype);
+ drawstateindicator(c->mon, c, 1, x, a->y, w, a->h, 0, 0, c->isfixed);
x += tabw + (i < remainder ? 1 : 0);
}
}
diff --git a/patch/bar_fancybar.c b/patch/bar_fancybar.c
index 2b5ce72..e4efbb1 100644
--- a/patch/bar_fancybar.c
+++ b/patch/bar_fancybar.c
@@ -53,8 +53,7 @@ draw_fancybar(Bar *bar, BarArg *a)
drw_setscheme(drw, scheme[m->sel == c ? SchemeTitleSel : SchemeTitleNorm]);
if (ftw > 0) /* trap special handling of 0 in drw_text */
drw_text(drw, x, a->y, ftw, a->h, lrpad / 2, c->name, 0, False);
- if (c->isfloating)
- drawindicator(c->mon, c, 1, x, a->y, w, a->h, 0, 0, c->isfixed, floatindicatortype);
+ drawstateindicator(c->mon, c, 1, x, a->y, w, a->h, 0, 0, c->isfixed);
x += ftw;
w -= ftw;
}
diff --git a/patch/bar_flexwintitle.c b/patch/bar_flexwintitle.c
index 2c46b0e..1b60769 100644
--- a/patch/bar_flexwintitle.c
+++ b/patch/bar_flexwintitle.c
@@ -190,8 +190,7 @@ flextitledraw(Monitor *m, Client *c, int unused, int x, int w, int tabscheme, Ar
#endif // BAR_CENTEREDWINDOWNAME_PATCH
drw_text(drw, x, barg->y, w, barg->h, pad, c->name, 0, False);
- if (c->isfloating)
- drawindicator(m, c, 1, x + 2, barg->y, w, barg->h, 0, 0, 0, floatindicatortype);
+ drawstateindicator(m, c, 1, x + 2, barg->y, w, barg->h, 0, 0, 0);
if (FLEXWINTITLE_BORDERS) {
XSetForeground(drw->dpy, drw->gc, scheme[SchemeSel][ColBorder].pixel);
diff --git a/patch/bar_indicators.c b/patch/bar_indicators.c
index 624aff7..90eb1a0 100644
--- a/patch/bar_indicators.c
+++ b/patch/bar_indicators.c
@@ -77,5 +77,32 @@ drawindicator(Monitor *m, Client *c, unsigned int occ, int x, int y, int w, int
);
}
break;
+ case INDICATOR_PLUS_AND_LARGER_SQUARE:
+ boxs += 2;
+ boxw += 2;
+ /* falls through */
+ case INDICATOR_PLUS_AND_SQUARE:
+ drw_rect(drw, x + boxs, y + boxs, boxw % 2 ? boxw : boxw + 1, boxw % 2 ? boxw : boxw + 1, filled, invert);
+ /* falls through */
+ case INDICATOR_PLUS:
+ if (!(boxw % 2))
+ boxw += 1;
+ drw_rect(drw, x + boxs + boxw / 2, y + boxs, 1, boxw, filled, invert); // |
+ drw_rect(drw, x + boxs, y + boxs + boxw / 2, boxw + 1, 1, filled, invert); // ‒
+ break;
}
+}
+
+void
+drawstateindicator(Monitor *m, Client *c, unsigned int occ, int x, int y, int w, int h, unsigned int tag, int filled, int invert)
+{
+ #if FAKEFULLSCREEN_CLIENT_PATCH
+ if (c->fakefullscreen && c->isfloating)
+ drawindicator(m, c, occ, x, y, w, h, tag, filled, invert, floatfakefsindicatortype);
+ else if (c->fakefullscreen)
+ drawindicator(m, c, occ, x, y, w, h, tag, filled, invert, fakefsindicatortype);
+ else
+ #endif // FAKEFULLSCREEN_CLIENT_PATCH
+ if (c->isfloating)
+ drawindicator(m, c, occ, x, y, w, h, tag, filled, invert, floatindicatortype);
} \ No newline at end of file
diff --git a/patch/bar_indicators.h b/patch/bar_indicators.h
index 1364cc3..d015101 100644
--- a/patch/bar_indicators.h
+++ b/patch/bar_indicators.h
@@ -10,7 +10,11 @@ enum {
INDICATOR_BOX_WIDER,
INDICATOR_BOX_FULL,
INDICATOR_CLIENT_DOTS,
- INDICATOR_RIGHT_TAGS
+ INDICATOR_RIGHT_TAGS,
+ INDICATOR_PLUS,
+ INDICATOR_PLUS_AND_SQUARE,
+ INDICATOR_PLUS_AND_LARGER_SQUARE,
};
-static void drawindicator(Monitor *m, Client *c, unsigned int occ, int x, int y, int w, int h, unsigned int tag, int filled, int invert, int type); \ No newline at end of file
+static void drawindicator(Monitor *m, Client *c, unsigned int occ, int x, int y, int w, int h, unsigned int tag, int filled, int invert, int type);
+static void drawstateindicator(Monitor *m, Client *c, unsigned int occ, int x, int y, int w, int h, unsigned int tag, int filled, int invert); \ No newline at end of file
diff --git a/patch/bar_tabgroups.c b/patch/bar_tabgroups.c
index b0bcdb1..28a39fa 100644
--- a/patch/bar_tabgroups.c
+++ b/patch/bar_tabgroups.c
@@ -60,8 +60,7 @@ bartabdraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg
#endif // BAR_CENTEREDWINDOWNAME_PATCH
drw_text(drw, x, barg->y, w, barg->h, pad, c->name, 0, False);
- if (c->isfloating)
- drawindicator(m, c, 1, x, barg->y, w, barg->h, 0, 0, c->isfixed, floatindicatortype);
+ drawstateindicator(m, c, 1, x, barg->y, w, barg->h, 0, 0, c->isfixed);
if (BARTAB_BORDERS) {
XSetForeground(drw->dpy, drw->gc, scheme[SchemeSel][ColBorder].pixel);
diff --git a/patch/bar_wintitle.c b/patch/bar_wintitle.c
index ae2efce..1e9fb77 100644
--- a/patch/bar_wintitle.c
+++ b/patch/bar_wintitle.c
@@ -38,8 +38,7 @@ draw_wintitle(Bar *bar, BarArg *a)
XSync(dpy, False);
XSetErrorHandler(xerror);
#endif // BAR_IGNORE_XFT_ERRORS_WHEN_DRAWING_TEXT_PATCH
- if (m->sel->isfloating)
- drawindicator(m, m->sel, 1, x, a->y, w, a->h, 0, 0, m->sel->isfixed, floatindicatortype);
+ drawstateindicator(m, m->sel, 1, x, a->y, w, a->h, 0, 0, m->sel->isfixed);
return 1;
}
diff --git a/patch/fakefullscreenclient.c b/patch/fakefullscreenclient.c
index 2e57bf3..eb51652 100644
--- a/patch/fakefullscreenclient.c
+++ b/patch/fakefullscreenclient.c
@@ -15,4 +15,4 @@ togglefakefullscreen(const Arg *arg)
c->fakefullscreen = 1;
setfullscreen(c, 1);
}
-} \ No newline at end of file
+}