122 lines
4.0 KiB
Diff
122 lines
4.0 KiB
Diff
diff --git a/config.def.h b/config.def.h
|
|
index 061ad66..5820b62 100644
|
|
--- a/config.def.h
|
|
+++ b/config.def.h
|
|
@@ -38,10 +38,10 @@ static const int resizehints = 1; /* 1 means respect size hints in tiled resi
|
|
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
|
|
|
static const Layout layouts[] = {
|
|
- /* symbol arrange function */
|
|
- { "[]=", tile }, /* first entry is default */
|
|
- { "><>", NULL }, /* no layout function means floating behavior */
|
|
- { "[M]", monocle },
|
|
+ /* arrange function */
|
|
+ { tile }, /* first entry is default */
|
|
+ { NULL }, /* no layout function means floating behavior */
|
|
+ { monocle },
|
|
};
|
|
|
|
/* key definitions */
|
|
@@ -97,11 +97,9 @@ static const Key keys[] = {
|
|
};
|
|
|
|
/* button definitions */
|
|
-/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
|
+/* click can be ClkTagBar, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
|
static const Button buttons[] = {
|
|
/* click event mask button function argument */
|
|
- { ClkLtSymbol, 0, Button1, setlayout, {0} },
|
|
- { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
|
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
|
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
|
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
|
diff --git a/dwm.c b/dwm.c
|
|
index e5efb6a..1109862 100644
|
|
--- a/dwm.c
|
|
+++ b/dwm.c
|
|
@@ -64,7 +64,7 @@ enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
|
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
|
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
|
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
|
|
-enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
|
|
+enum { ClkTagBar, ClkStatusText, ClkWinTitle,
|
|
ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
|
|
|
|
typedef union {
|
|
@@ -107,12 +107,10 @@ typedef struct {
|
|
} Key;
|
|
|
|
typedef struct {
|
|
- const char *symbol;
|
|
void (*arrange)(Monitor *);
|
|
} Layout;
|
|
|
|
struct Monitor {
|
|
- char ltsymbol[16];
|
|
float mfact;
|
|
int nmaster;
|
|
int num;
|
|
@@ -397,7 +395,6 @@ arrange(Monitor *m)
|
|
void
|
|
arrangemon(Monitor *m)
|
|
{
|
|
- strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol);
|
|
if (m->lt[m->sellt]->arrange)
|
|
m->lt[m->sellt]->arrange(m);
|
|
}
|
|
@@ -440,9 +437,7 @@ buttonpress(XEvent *e)
|
|
if (i < LENGTH(tags)) {
|
|
click = ClkTagBar;
|
|
arg.ui = 1 << i;
|
|
- } else if (ev->x < x + TEXTW(selmon->ltsymbol))
|
|
- click = ClkLtSymbol;
|
|
- else if (ev->x > selmon->ww - (int)TEXTW(stext))
|
|
+ } else if (ev->x > selmon->ww - (int)TEXTW(stext))
|
|
click = ClkStatusText;
|
|
else
|
|
click = ClkWinTitle;
|
|
@@ -473,7 +468,7 @@ void
|
|
cleanup(void)
|
|
{
|
|
Arg a = {.ui = ~0};
|
|
- Layout foo = { "", NULL };
|
|
+ Layout foo = { NULL };
|
|
Monitor *m;
|
|
size_t i;
|
|
|
|
@@ -644,7 +639,6 @@ createmon(void)
|
|
m->topbar = topbar;
|
|
m->lt[0] = &layouts[0];
|
|
m->lt[1] = &layouts[1 % LENGTH(layouts)];
|
|
- strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
|
|
return m;
|
|
}
|
|
|
|
@@ -731,9 +725,7 @@ drawbar(Monitor *m)
|
|
urg & 1 << i);
|
|
x += w;
|
|
}
|
|
- w = TEXTW(m->ltsymbol);
|
|
drw_setscheme(drw, scheme[SchemeNorm]);
|
|
- x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
|
|
|
|
if ((w = m->ww - tw - x) > bh) {
|
|
if (m->sel) {
|
|
@@ -1110,8 +1102,6 @@ monocle(Monitor *m)
|
|
for (c = m->clients; c; c = c->next)
|
|
if (ISVISIBLE(c))
|
|
n++;
|
|
- if (n > 0) /* override layout symbol */
|
|
- 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);
|
|
}
|
|
@@ -1505,7 +1495,6 @@ setlayout(const Arg *arg)
|
|
selmon->sellt ^= 1;
|
|
if (arg && arg->v)
|
|
selmon->lt[selmon->sellt] = (Layout *)arg->v;
|
|
- strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
|
|
if (selmon->sel)
|
|
arrange(selmon);
|
|
else
|