mirror of
https://github.com/tiyn/dwm.git
synced 2025-04-20 00:07:46 +02:00
Compare commits
No commits in common. "f8d402ce8dc35775d6617ff6a85caf9893a9f890" and "920f45062d26a63c9d885e8794b4cbb7ea5cec7e" have entirely different histories.
f8d402ce8d
...
920f45062d
@ -13,9 +13,9 @@ This repository is set up according to the
|
||||
|
||||
The list below shows the currently applied patches to the master branch.
|
||||
|
||||
- dwm-activetagindicatorbar-6.2.diff (show bar as window indicator)
|
||||
- dwm-actualfullscreen-20191112-cb3f58a.diff (enables true fullscreen)
|
||||
- dwm-alpha-20180613-b69c870.diff (adds transparency)
|
||||
- dwm-alttagsdecoration-2020010304-cb3f58a.diff (enables different icons for tags with windows)
|
||||
- dwm-bottomstack-20160719-56a31dc.diff (adds bottomstack and bottomstackhorizontal layout)
|
||||
- dwm-center-6.1.diff (adds ability to center floating windows at launch)
|
||||
- dwm-deck-6.0.diff (adds deck layout)
|
||||
|
16
config.def.h
16
config.def.h
@ -34,7 +34,8 @@ static const unsigned int alphas[][3] = {
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "", "", "", "", "", "", "", "", "" };
|
||||
static const char *tags[] = { "", "", "", "", "", "", "", "", "" };
|
||||
static const char *alttags[] = { "", "", "", "", "", "", "", "", "" };
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
@ -52,11 +53,11 @@ static const int resizehints = 1; /* 1 means respect size hints in tiled resi
|
||||
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{ "M", monocle },
|
||||
{ "T", tile }, /* first entry is default */
|
||||
{ "D", deck },
|
||||
{ "B", bstack },
|
||||
{ "B", bstackhoriz },
|
||||
{ "M", monocle },
|
||||
{ "T", tile }, /* first entry is default */
|
||||
{ "D", deck },
|
||||
{ "B", bstack },
|
||||
{ "=", bstackhoriz },
|
||||
{ "F", NULL }, /* no layout function means floating behavior */
|
||||
};
|
||||
|
||||
@ -120,7 +121,8 @@ static Key keys[] = {
|
||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||
static Button buttons[] = {
|
||||
/* click event mask button function argument */
|
||||
{ ClkLtSymbol, 0, Button1, setlayout, {.v = 0 } },
|
||||
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
||||
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
||||
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
||||
{ ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} },
|
||||
{ ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} },
|
||||
|
16
config.h
16
config.h
@ -34,7 +34,8 @@ static const unsigned int alphas[][3] = {
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "", "", "", "", "", "", "", "", "" };
|
||||
static const char *tags[] = { "", "", "", "", "", "", "", "", "" };
|
||||
static const char *alttags[] = { "", "", "", "", "", "", "", "", "" };
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
@ -52,11 +53,11 @@ static const int resizehints = 1; /* 1 means respect size hints in tiled resi
|
||||
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{ "M", monocle },
|
||||
{ "T", tile }, /* first entry is default */
|
||||
{ "D", deck },
|
||||
{ "B", bstack },
|
||||
{ "B", bstackhoriz },
|
||||
{ "M", monocle },
|
||||
{ "T", tile }, /* first entry is default */
|
||||
{ "D", deck },
|
||||
{ "B", bstack },
|
||||
{ "=", bstackhoriz },
|
||||
{ "F", NULL }, /* no layout function means floating behavior */
|
||||
};
|
||||
|
||||
@ -120,7 +121,8 @@ static Key keys[] = {
|
||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||
static Button buttons[] = {
|
||||
/* click event mask button function argument */
|
||||
{ ClkLtSymbol, 0, Button1, setlayout, {.v = 0 } },
|
||||
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
||||
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
||||
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
||||
{ ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} },
|
||||
{ ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} },
|
||||
|
@ -1,17 +0,0 @@
|
||||
diff -up dwm-a/dwm.c dwm-b/dwm.c
|
||||
--- dwm-a/dwm.c 2019-02-02 06:55:28.000000000 -0600
|
||||
+++ dwm-b/dwm.c 2019-02-23 21:43:13.359179100 -0600
|
||||
@@ -719,9 +719,10 @@ drawbar(Monitor *m)
|
||||
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
|
||||
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
|
||||
if (occ & 1 << i)
|
||||
- drw_rect(drw, x + boxs, boxs, boxw, boxw,
|
||||
- m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
|
||||
- urg & 1 << i);
|
||||
+ drw_rect(drw, x + boxw, 0, w - ( 2 * boxw + 1), boxw,
|
||||
+ m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
|
||||
+ urg & 1 << i);
|
||||
+
|
||||
x += w;
|
||||
}
|
||||
w = blw = TEXTW(m->ltsymbol);
|
67
dwm-alttagsdecoration-2020010304-cb3f58a.diff
Normal file
67
dwm-alttagsdecoration-2020010304-cb3f58a.diff
Normal file
@ -0,0 +1,67 @@
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 1c0b587..d4b11fc 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -20,6 +20,7 @@ static const char *colors[][3] = {
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
+static const char *alttags[] = { "<01>", "<02>", "<03>", "<04>", "<05>" };
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index 4465af1..a394159 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -416,7 +416,7 @@ attachstack(Client *c)
|
||||
void
|
||||
buttonpress(XEvent *e)
|
||||
{
|
||||
- unsigned int i, x, click;
|
||||
+ unsigned int i, x, click, occ;
|
||||
Arg arg = {0};
|
||||
Client *c;
|
||||
Monitor *m;
|
||||
@@ -430,9 +430,13 @@ buttonpress(XEvent *e)
|
||||
focus(NULL);
|
||||
}
|
||||
if (ev->window == selmon->barwin) {
|
||||
- i = x = 0;
|
||||
+ i = x = occ = 0;
|
||||
+ /* Bitmask of occupied tags */
|
||||
+ for (c = m->clients; c; c = c->next)
|
||||
+ occ |= c->tags;
|
||||
+
|
||||
do
|
||||
- x += TEXTW(tags[i]);
|
||||
+ x += TEXTW(occ & 1 << i ? alttags[i] : tags[i]);
|
||||
while (ev->x >= x && ++i < LENGTH(tags));
|
||||
if (i < LENGTH(tags)) {
|
||||
click = ClkTagBar;
|
||||
@@ -699,6 +703,7 @@ drawbar(Monitor *m)
|
||||
int boxs = drw->fonts->h / 9;
|
||||
int boxw = drw->fonts->h / 6 + 2;
|
||||
unsigned int i, occ = 0, urg = 0;
|
||||
+ const char *tagtext;
|
||||
Client *c;
|
||||
|
||||
/* draw status first so it can be overdrawn by tags later */
|
||||
@@ -715,13 +720,10 @@ drawbar(Monitor *m)
|
||||
}
|
||||
x = 0;
|
||||
for (i = 0; i < LENGTH(tags); i++) {
|
||||
- w = TEXTW(tags[i]);
|
||||
- drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
|
||||
- drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
|
||||
- if (occ & 1 << i)
|
||||
- drw_rect(drw, x + boxs, boxs, boxw, boxw,
|
||||
- m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
|
||||
- urg & 1 << i);
|
||||
+ tagtext = occ & 1 << i ? alttags[i] : tags[i];
|
||||
+ w = TEXTW(tagtext);
|
||||
+ drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
|
||||
+ drw_text(drw, x, 0, w, bh, lrpad / 2, tagtext, urg & 1 << i);
|
||||
x += w;
|
||||
}
|
||||
w = blw = TEXTW(m->ltsymbol);
|
25
dwm.c
25
dwm.c
@ -483,7 +483,7 @@ attachstack(Client *c)
|
||||
void
|
||||
buttonpress(XEvent *e)
|
||||
{
|
||||
unsigned int i, x, click;
|
||||
unsigned int i, x, click, occ;
|
||||
Arg arg = {0};
|
||||
Client *c;
|
||||
Monitor *m;
|
||||
@ -497,9 +497,13 @@ buttonpress(XEvent *e)
|
||||
focus(NULL);
|
||||
}
|
||||
if (ev->window == selmon->barwin) {
|
||||
i = x = 0;
|
||||
i = x = occ = 0;
|
||||
/* Bitmask of occupied tags */
|
||||
for (c = m->clients; c; c = c->next)
|
||||
occ |= c->tags;
|
||||
|
||||
do
|
||||
x += TEXTW(tags[i]);
|
||||
x += TEXTW(occ & 1 << i ? alttags[i] : tags[i]);
|
||||
while (ev->x >= x && ++i < LENGTH(tags));
|
||||
if (i < LENGTH(tags)) {
|
||||
click = ClkTagBar;
|
||||
@ -835,7 +839,7 @@ deck(Monitor *m) {
|
||||
|
||||
if(n > m->nmaster) {
|
||||
mw = m->nmaster ? m->ww * m->mfact : 0;
|
||||
snprintf(m->ltsymbol, sizeof m->ltsymbol, "%d", n - m->nmaster);
|
||||
snprintf(m->ltsymbol, sizeof m->ltsymbol, "%d", n - m->nmaster);
|
||||
}
|
||||
else
|
||||
mw = m->ww;
|
||||
@ -1007,6 +1011,7 @@ drawbar(Monitor *m)
|
||||
int boxs = drw->fonts->h / 9;
|
||||
int boxw = drw->fonts->h / 6 + 2;
|
||||
unsigned int i, occ = 0, urg = 0;
|
||||
const char *tagtext;
|
||||
Client *c;
|
||||
|
||||
if(showsystray && m == systraytomon(m))
|
||||
@ -1025,14 +1030,10 @@ drawbar(Monitor *m)
|
||||
}
|
||||
x = 0;
|
||||
for (i = 0; i < LENGTH(tags); i++) {
|
||||
w = TEXTW(tags[i]);
|
||||
tagtext = occ & 1 << i ? alttags[i] : tags[i];
|
||||
w = TEXTW(tagtext);
|
||||
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
|
||||
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
|
||||
if (occ & 1 << i)
|
||||
drw_rect(drw, x + boxw, 0, w - ( 2 * boxw + 1), boxw,
|
||||
m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
|
||||
urg & 1 << i);
|
||||
|
||||
drw_text(drw, x, 0, w, bh, lrpad / 2, tagtext, urg & 1 << i);
|
||||
x += w;
|
||||
}
|
||||
w = blw = TEXTW(m->ltsymbol);
|
||||
@ -1464,7 +1465,7 @@ monocle(Monitor *m)
|
||||
if (ISVISIBLE(c))
|
||||
n++;
|
||||
if (n > 0) /* override layout symbol */
|
||||
snprintf(m->ltsymbol, sizeof m->ltsymbol, "%d", n);
|
||||
snprintf(m->ltsymbol, sizeof m->ltsymbol, "%d", n);
|
||||
for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
|
||||
resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user