diff --git a/config.def.h b/config.def.h index 75e60c5..1e67089 100644 --- a/config.def.h +++ b/config.def.h @@ -60,8 +60,13 @@ static const char buttonbar[] = ""; static const unsigned int systrayspacing = 2; /* systray spacing */ static const int showsystray = 1; /* 0 means no systray */ #endif // BAR_SYSTRAY_PATCH -static int tagindicatortype = INDICATOR_TOP_LEFT_SQUARE; // see patch/bar_indicators.h for options -static int floatindicatortype = INDICATOR_TOP_LEFT_SQUARE; // see patch/bar_indicators.h for options +/* Indicators: see patch/bar_indicators.h for options */ +static int tagindicatortype = INDICATOR_TOP_LEFT_SQUARE; +static int floatindicatortype = INDICATOR_TOP_LEFT_SQUARE; +#if FAKEFULLSCREEN_CLIENT_PATCH +static int fakefsindicatortype = INDICATOR_PLUS; +static int floatfakefsindicatortype = INDICATOR_PLUS_AND_LARGER_SQUARE; +#endif // FAKEFULLSCREEN_CLIENT_PATCH #if ONLYQUITONEMPTY_PATCH static const int quit_empty_window_count = 2; /* only allow dwm to quit if no windows are open, value here represents number of deamons */ #endif // ONLYQUITONEMPTY_PATCH 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 +}