aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-05-02 23:47:56 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2024-05-02 23:47:56 +0200
commit8faec3867d8684fbde5cbe429c9adc8e0935af1b (patch)
tree319a924c82583b06095f02b20f306f026587f4fa
parent7c7c8c58c9a77abfc9356d4f269b876e7790b483 (diff)
downloaddwm-8faec3867d8684fbde5cbe429c9adc8e0935af1b.tar.gz
dwm-8faec3867d8684fbde5cbe429c9adc8e0935af1b.zip
Add FreeBSD logo on tag bar
-rw-r--r--config.def.h22
-rw-r--r--dwm.c6
2 files changed, 16 insertions, 12 deletions
diff --git a/config.def.h b/config.def.h
index c4fcd29..400dc39 100644
--- a/config.def.h
+++ b/config.def.h
@@ -19,7 +19,7 @@ static const char *colors[][3] = {
};
/* tagging */
-static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+static const char *tags[] = { "\uf30c", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const Rule rules[] = {
/* xprop(1):
@@ -84,21 +84,21 @@ static const Key keys[] = {
{ MODKEY, XK_o, setlayout, {.v = &layouts[4]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
- { MODKEY, XK_0, view, {.ui = ~0 } },
+ { MODKEY, XK_0, view, {.ui = ~1 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
- TAGKEYS( XK_1, 0)
- TAGKEYS( XK_2, 1)
- TAGKEYS( XK_3, 2)
- TAGKEYS( XK_4, 3)
- TAGKEYS( XK_5, 4)
- TAGKEYS( XK_6, 5)
- TAGKEYS( XK_7, 6)
- TAGKEYS( XK_8, 7)
- TAGKEYS( XK_9, 8)
+ TAGKEYS( XK_1, 1)
+ TAGKEYS( XK_2, 2)
+ TAGKEYS( XK_3, 3)
+ TAGKEYS( XK_4, 4)
+ TAGKEYS( XK_5, 5)
+ TAGKEYS( XK_6, 6)
+ TAGKEYS( XK_7, 7)
+ TAGKEYS( XK_8, 8)
+ TAGKEYS( XK_9, 9)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
diff --git a/dwm.c b/dwm.c
index b3ac951..9da0961 100644
--- a/dwm.c
+++ b/dwm.c
@@ -450,6 +450,8 @@ buttonpress(XEvent *e)
x += TEXTW(tags[i]);
while (ev->x >= x && ++i < LENGTH(tags));
if (i < LENGTH(tags)) {
+ if (i <= 0) return; /* Avoid clicking on logo */
+
click = ClkTagBar;
arg.ui = 1 << i;
} else if (ev->x < x + TEXTW(selmon->ltsymbol))
@@ -650,7 +652,7 @@ createmon(void)
unsigned int i;
m = ecalloc(1, sizeof(Monitor));
- m->tagset[0] = m->tagset[1] = 1;
+ m->tagset[0] = m->tagset[1] = 2;
m->mfact = mfact;
m->nmaster = nmaster;
m->showbar = showbar;
@@ -2229,6 +2231,7 @@ main(int argc, char *argv[])
fputs("warning: no locale support\n", stderr);
if (!(dpy = XOpenDisplay(NULL)))
die("dwm: cannot open display");
+
checkotherwm();
setup();
#ifdef __OpenBSD__
@@ -2239,6 +2242,7 @@ main(int argc, char *argv[])
run();
cleanup();
XCloseDisplay(dpy);
+
return EXIT_SUCCESS;
}