Adding alternative activetagindicatorbar patch

This commit is contained in:
bakkeby 2020-06-30 11:07:42 +02:00
parent 8c07458f11
commit 9e8d70788c
2 changed files with 13 additions and 2 deletions

10
dwm.c
View File

@ -1521,13 +1521,13 @@ drawbar(Monitor *m)
stp = lrpad / 2;
#endif // STATUSPADDING_PATCH
#if !HIDEVACANTTAGS_PATCH
#if !ACTIVETAGINDICATORBAR_PATCH
#if !ACTIVETAGINDICATORBAR_PATCH && !ACTIVETAGINDICATORBAR_ALT1_PATCH
#if PANGO_PATCH
int boxs = drw->font->h / 9;
#else
int boxs = drw->fonts->h / 9;
#endif // PANGO_PATCH
#endif // ACTIVETAGINDICATORBAR_PATCH
#endif // ACTIVETAGINDICATORBAR_PATCH | ACTIVETAGINDICATORBAR_ALT1_PATCH
#if PANGO_PATCH
int boxw = drw->font->h / 6 + 2;
#else
@ -1699,6 +1699,8 @@ drawbar(Monitor *m)
if (occ & 1 << i)
#if ACTIVETAGINDICATORBAR_PATCH
drw_rect(drw, x + boxw, 0, w - ( 2 * boxw + 1), boxw,
#elif ACTIVETAGINDICATORBAR_ALT1_PATCH
drw_rect(drw, x + boxw, bh - boxw/2, w - ( 2 * boxw + 1), boxw/2,
#else
drw_rect(drw, x + boxs, boxs, boxw, boxw,
#endif // ACTIVETAGINDICATORBAR_PATCH
@ -1812,6 +1814,8 @@ drawbar(Monitor *m)
if (c->isfloating)
#if ACTIVETAGINDICATORBAR_PATCH
drw_rect(drw, x + boxw, 0, w - ( 2 * boxw + 1), boxw, c->isfixed, 0);
#elif ACTIVETAGINDICATORBAR_ALT1_PATCH
drw_rect(drw, x + boxw, bh - boxw/2, w - ( 2 * boxw + 1), boxw/2,
#else
drw_rect(drw, x + boxs, boxs, boxw, boxw, c->isfixed, 0);
#endif // ACTIVETAGINDICATORBAR_PATCH
@ -1868,6 +1872,8 @@ drawbar(Monitor *m)
if (m->sel->isfloating)
#if ACTIVETAGINDICATORBAR_PATCH
drw_rect(drw, x + boxw, 0, w - ( 2 * boxw + 1), boxw, m->sel->isfixed, 0);
#elif ACTIVETAGINDICATORBAR_ALT1_PATCH
drw_rect(drw, x + boxw, bh - boxw/2, w - ( 2 * boxw + 1), boxw/2,
#else
drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
#endif // ACTIVETAGINDICATORBAR_PATCH

View File

@ -18,6 +18,11 @@
*/
#define ACTIVETAGINDICATORBAR_PATCH 0
/* Alternative patch to the activetagindicatorbar patch, adds the bar below the tag
* icon rather than above.
*/
#define ACTIVETAGINDICATORBAR_ALT1_PATCH 0
/* The alpha patch adds transparency for the status bar.
* You need to uncomment the corresponding line in config.mk to use the -lXrender library
* when including this patch.