1
0
mirror of https://github.com/tiyn/dwm.git synced 2025-10-15 20:31:18 +02:00

3 Commits

Author SHA1 Message Date
98b3429b3b updated gitignore 2023-10-24 06:06:00 +02:00
6901b39847 added zeroastag patch 2023-10-24 03:08:42 +02:00
61088a7795 added gitignore 2023-10-15 03:30:28 +02:00
4 changed files with 48 additions and 32 deletions

View File

@@ -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[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" };
static const Rule rules[] = {
/* xprop(1):
@@ -78,8 +78,6 @@ static Key keys[] = {
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ 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 } },
@@ -93,6 +91,7 @@ static Key keys[] = {
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
TAGKEYS( XK_0, 9)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};

View File

@@ -1,25 +0,0 @@
diff -up a/dwm.c b/dwm.c
--- a/dwm.c 2020-07-09 16:49:10.023585649 +0200
+++ b/dwm.c 2020-07-09 16:49:43.497542191 +0200
@@ -702,7 +702,7 @@ drawbar(Monitor *m)
Client *c;
/* draw status first so it can be overdrawn by tags later */
- if (m == selmon) { /* status is only drawn on selected monitor */
+ if (m == selmon || 1) { /* status is only drawn on selected monitor */
drw_setscheme(drw, scheme[SchemeNorm]);
sw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0);
@@ -1987,9 +1987,11 @@ updatesizehints(Client *c)
void
updatestatus(void)
{
+ Monitor* m;
if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
strcpy(stext, "dwm-"VERSION);
- drawbar(selmon);
+ for(m = mons; m; m = m->next)
+ drawbar(m);
}
void

View File

@@ -0,0 +1,44 @@
From 0aea8051b1ae85c568dc69d4cf9865de9ad6acce Mon Sep 17 00:00:00 2001
From: Michal Orman <michal.orman@gmail.com>
Date: Wed, 22 Mar 2023 16:02:45 +0100
Subject: [PATCH] Make XK_0 a regular tag.
Change the default behavior of XK_0 from selecting all tags to be
a regular 10th tag.
---
config.def.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/config.def.h b/config.def.h
index 9efa774..15d02d7 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[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" };
static const Rule rules[] = {
/* xprop(1):
@@ -79,8 +79,6 @@ static const Key keys[] = {
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
- { MODKEY, XK_0, view, {.ui = ~0 } },
- { 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 } },
@@ -94,6 +92,7 @@ static const Key keys[] = {
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
+ TAGKEYS( XK_0, 9)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
--
2.40.0

6
dwm.c
View File

@@ -702,7 +702,7 @@ drawbar(Monitor *m)
Client *c;
/* draw status first so it can be overdrawn by tags later */
if (m == selmon || 1) { /* status is only drawn on selected monitor */
if (m == selmon) { /* status is only drawn on selected monitor */
drw_setscheme(drw, scheme[SchemeNorm]);
sw = TEXTW(stext) - lrpad + 2; /* 2px right padding */
drw_text(drw, m->ww - sw, 0, sw, bh, 0, stext, 0);
@@ -1987,11 +1987,9 @@ updatesizehints(Client *c)
void
updatestatus(void)
{
Monitor* m;
if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
strcpy(stext, "dwm-"VERSION);
for(m = mons; m; m = m->next)
drawbar(m);
drawbar(selmon);
}
void