commit 2099a754ef64e211e8d52d005efd79779cc8c468
Author: Aaron Duxler <[email protected]>
Date: Thu Jun 20 15:21:30 2019 +0200
[dwm][patch] scratchpad, reset scratchpad bugfix
diff --git
a/dwm.suckless.org/patches/scratchpad/dwm-scratchpad-20190601-cb3f58a.diff
b/dwm.suckless.org/patches/scratchpad/dwm-scratchpad-20190620-cb3f58a.diff
similarity index 55%
rename from
dwm.suckless.org/patches/scratchpad/dwm-scratchpad-20190601-cb3f58a.diff
rename to
dwm.suckless.org/patches/scratchpad/dwm-scratchpad-20190620-cb3f58a.diff
index e2015770..d0e62f9d 100644
--- a/dwm.suckless.org/patches/scratchpad/dwm-scratchpad-20190601-cb3f58a.diff
+++ b/dwm.suckless.org/patches/scratchpad/dwm-scratchpad-20190620-cb3f58a.diff
@@ -1,34 +1,14 @@
-From 9a521a40264575c977403218aa0f66f6f3e9a26f Mon Sep 17 00:00:00 2001
+From 5ddd858a6b7cc2dc589d4046c7e9a49593c2d9dc Mon Sep 17 00:00:00 2001
From: Aaron Duxler <[email protected]>
-Date: Sat, 1 Jun 2019 10:19:19 +0200
-Subject: [PATCH] patch scratchpad bugfix
+Date: Thu, 20 Jun 2019 15:15:46 +0200
+Subject: [PATCH] [dwm][patch] scratchpad, reset scratchtag fix
---
- config.def.h | 3 +++
- dwm.c | 33 +++++++++++++++++++++++++++++++++
- 2 files changed, 36 insertions(+)
+ dwm.c | 34 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
-diff --git a/config.def.h b/config.def.h
-index 1c0b587..8a5b9d6 100644
---- a/config.def.h
-+++ b/config.def.h
-@@ -58,11 +58,14 @@ static const Layout layouts[] = {
- static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in
spawn() */
- static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn",
dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf",
col_gray4, NULL };
- static const char *termcmd[] = { "st", NULL };
-+static const char scratchpadname[] = "scratchpad";
-+static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g",
"120x34", NULL };
-
- static Key keys[] = {
- /* modifier key function argument */
- { MODKEY, XK_p, spawn, {.v =
dmenucmd } },
- { MODKEY|ShiftMask, XK_Return, spawn, {.v =
termcmd } },
-+ { MODKEY, XK_grave, togglescratch, {.v =
scratchpadcmd } },
- { MODKEY, XK_b, togglebar, {0} },
- { MODKEY, XK_j, focusstack, {.i = +1 } },
- { MODKEY, XK_k, focusstack, {.i = -1 } },
diff --git a/dwm.c b/dwm.c
-index 4465af1..610625f 100644
+index 4465af1..6bfa2ae 100644
--- a/dwm.c
+++ b/dwm.c
@@ -211,6 +211,7 @@ static void tagmon(const Arg *arg);
@@ -48,10 +28,11 @@ index 4465af1..610625f 100644
/* compile-time check if all tags fit into an unsigned int bit array. */
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
-@@ -1049,6 +1052,13 @@ manage(Window w, XWindowAttributes *wa)
+@@ -1049,6 +1052,14 @@ manage(Window w, XWindowAttributes *wa)
&& (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh :
c->mon->my);
c->bw = borderpx;
++ selmon->tagset[selmon->seltags] &= ~scratchtag;
+ if (!strcmp(c->name, scratchpadname)) {
+ c->mon->tagset[c->mon->seltags] |= c->tags = scratchtag;
+ c->isfloating = True;
@@ -62,7 +43,7 @@ index 4465af1..610625f 100644
wc.border_width = c->bw;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
-@@ -1641,6 +1651,7 @@ spawn(const Arg *arg)
+@@ -1641,6 +1652,7 @@ spawn(const Arg *arg)
{
if (arg->v == dmenucmd)
dmenumon[0] = '0' + selmon->num;
@@ -70,7 +51,7 @@ index 4465af1..610625f 100644
if (fork() == 0) {
if (dpy)
close(ConnectionNumber(dpy));
-@@ -1719,6 +1730,28 @@ togglefloating(const Arg *arg)
+@@ -1719,6 +1731,28 @@ togglefloating(const Arg *arg)
arrange(selmon);
}
@@ -100,5 +81,5 @@ index 4465af1..610625f 100644
toggletag(const Arg *arg)
{
--
-2.21.0
+2.22.0
diff --git a/dwm.suckless.org/patches/scratchpad/dwm-scratchpad-6.2.diff
b/dwm.suckless.org/patches/scratchpad/dwm-scratchpad-6.2.diff
index 1d2950ff..2062263e 100644
--- a/dwm.suckless.org/patches/scratchpad/dwm-scratchpad-6.2.diff
+++ b/dwm.suckless.org/patches/scratchpad/dwm-scratchpad-6.2.diff
@@ -1,6 +1,6 @@
diff -up a/config.def.h b/config.def.h
---- a/config.def.h 2019-05-30 20:23:02.886614099 +0200
-+++ b/config.def.h 2019-06-01 01:47:35.159940694 +0200
+--- a/config.def.h 2019-06-06 21:23:27.006661784 +0200
++++ b/config.def.h 2019-06-20 15:05:59.083102462 +0200
@@ -58,11 +58,14 @@ static const Layout layouts[] = {
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in
spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn",
dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf",
col_gray4, NULL };
@@ -17,9 +17,9 @@ diff -up a/config.def.h b/config.def.h
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
diff -up a/dwm.c b/dwm.c
---- a/dwm.c 2019-05-30 20:23:02.886614099 +0200
-+++ b/dwm.c 2019-06-01 01:48:20.133273177 +0200
-@@ -211,6 +211,7 @@ static void tagmon(const Arg *arg);
+--- a/dwm.c 2019-06-06 21:23:27.023328450 +0200
++++ b/dwm.c 2019-06-20 15:07:01.089767947 +0200
+@@ -213,6 +213,7 @@ static void tagmon(const Arg *arg);
static void tile(Monitor *);
static void togglebar(const Arg *arg);
static void togglefloating(const Arg *arg);
@@ -27,7 +27,7 @@ diff -up a/dwm.c b/dwm.c
static void toggletag(const Arg *arg);
static void toggleview(const Arg *arg);
static void unfocus(Client *c, int setfocus);
-@@ -271,6 +272,8 @@ static Window root, wmcheckwin;
+@@ -273,6 +274,8 @@ static Window root, wmcheckwin;
/* configuration, allows nested code to access above variables */
#include "config.h"
@@ -36,10 +36,11 @@ diff -up a/dwm.c b/dwm.c
/* compile-time check if all tags fit into an unsigned int bit array. */
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
-@@ -1049,6 +1052,13 @@ manage(Window w, XWindowAttributes *wa)
+@@ -1052,6 +1055,14 @@ manage(Window w, XWindowAttributes *wa)
&& (c->x + (c->w / 2) < c->mon->wx + c->mon->ww)) ? bh :
c->mon->my);
c->bw = borderpx;
++ selmon->tagset[selmon->seltags] &= ~scratchtag;
+ if (!strcmp(c->name, scratchpadname)) {
+ c->mon->tagset[c->mon->seltags] |= c->tags = scratchtag;
+ c->isfloating = True;
@@ -50,7 +51,7 @@ diff -up a/dwm.c b/dwm.c
wc.border_width = c->bw;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
-@@ -1641,6 +1651,7 @@ spawn(const Arg *arg)
+@@ -1661,6 +1672,7 @@ spawn(const Arg *arg)
{
if (arg->v == dmenucmd)
dmenumon[0] = '0' + selmon->num;
@@ -58,7 +59,7 @@ diff -up a/dwm.c b/dwm.c
if (fork() == 0) {
if (dpy)
close(ConnectionNumber(dpy));
-@@ -1720,6 +1731,28 @@ togglefloating(const Arg *arg)
+@@ -1748,6 +1760,28 @@ togglefloating(const Arg *arg)
}
void