summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-11-26 23:48:57 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-11-26 23:48:57 +0530
commit05973555682a1e2ee6a89f0564260dccb47803fc (patch)
tree7e4a2307770df33a857fa02242d74729e4d09204
parente188c16fa8f91fd08522601b6827698133d692c8 (diff)
updating sticky patch for my buildHEADmain
-rw-r--r--patches/12.dwm-sticky-6.1.diff103
1 files changed, 83 insertions, 20 deletions
diff --git a/patches/12.dwm-sticky-6.1.diff b/patches/12.dwm-sticky-6.1.diff
index 717793f..0f0777b 100644
--- a/patches/12.dwm-sticky-6.1.diff
+++ b/patches/12.dwm-sticky-6.1.diff
@@ -1,20 +1,20 @@
-diff --git a/config.def.h b/config.def.h
-index 7054c06..9b5d5b8 100644
---- a/config.def.h
-+++ b/config.def.h
-@@ -76,6 +76,7 @@ static Key keys[] = {
- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
+diff --git a/config.h b/config.h
+index 6607c3b..025b1ab 100644
+--- a/config.h
++++ b/config.h
+@@ -106,6 +106,7 @@ static const Key keys[] = {
+ { MODKEY, XK_i, setlayout, {.v = &layouts[3]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
-+ { MODKEY, XK_s, togglesticky, {0} },
++ { MODKEY, XK_v, togglesticky, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
diff --git a/dwm.c b/dwm.c
-index 0362114..0ef5c7f 100644
+index 0585444..877e710 100644
--- a/dwm.c
+++ b/dwm.c
-@@ -49,7 +49,7 @@
+@@ -56,7 +56,7 @@
#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
#define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \
* MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy)))
@@ -23,27 +23,28 @@ index 0362114..0ef5c7f 100644
#define LENGTH(X) (sizeof X / sizeof X[0])
#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
#define WIDTH(X) ((X)->w + 2 * (X)->bw)
-@@ -92,7 +92,7 @@ struct Client {
- int basew, baseh, incw, inch, maxw, maxh, minw, minh;
+@@ -129,7 +129,7 @@ struct Client {
+ int basew, baseh, incw, inch, maxw, maxh, minw, minh, hintsvalid;
int bw, oldbw;
unsigned int tags;
-- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
-+ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, issticky;
+- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow;
++ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, issticky, noswallow;
+ pid_t pid;
Client *next;
Client *snext;
- Monitor *mon;
-@@ -211,6 +211,7 @@ static void tagmon(const Arg *arg);
- static void tile(Monitor *);
+@@ -275,6 +275,7 @@ static void tile(Monitor *m);
static void togglebar(const Arg *arg);
static void togglefloating(const Arg *arg);
+ static void togglescratch(const Arg *arg);
+static void togglesticky(const Arg *arg);
static void toggletag(const Arg *arg);
static void toggleview(const Arg *arg);
static void unfocus(Client *c, int setfocus);
-@@ -1713,6 +1714,15 @@ togglefloating(const Arg *arg)
+@@ -2209,6 +2210,15 @@ togglescratch(const Arg *arg)
+ spawn(arg);
}
- void
++void
+togglesticky(const Arg *arg)
+{
+ if (!selmon->sel)
@@ -52,7 +53,69 @@ index 0362114..0ef5c7f 100644
+ arrange(selmon);
+}
+
-+void
+ void
toggletag(const Arg *arg)
{
- unsigned int newtags;
+diff --git a/patches/12.dwm-sticky-6.1.diff b/patches/12.dwm-sticky-6.1.diff
+index 717793f..e69de29 100644
+--- a/patches/12.dwm-sticky-6.1.diff
++++ b/patches/12.dwm-sticky-6.1.diff
+@@ -1,58 +0,0 @@
+-diff --git a/config.def.h b/config.def.h
+-index 7054c06..9b5d5b8 100644
+---- a/config.def.h
+-+++ b/config.def.h
+-@@ -76,6 +76,7 @@ static Key keys[] = {
+- { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
+- { MODKEY, XK_space, setlayout, {0} },
+- { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
+-+ { MODKEY, XK_s, togglesticky, {0} },
+- { MODKEY, XK_0, view, {.ui = ~0 } },
+- { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
+- { MODKEY, XK_comma, focusmon, {.i = -1 } },
+-diff --git a/dwm.c b/dwm.c
+-index 0362114..0ef5c7f 100644
+---- a/dwm.c
+-+++ b/dwm.c
+-@@ -49,7 +49,7 @@
+- #define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
+- #define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \
+- * MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy)))
+--#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]))
+-+#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]) || C->issticky)
+- #define LENGTH(X) (sizeof X / sizeof X[0])
+- #define MOUSEMASK (BUTTONMASK|PointerMotionMask)
+- #define WIDTH(X) ((X)->w + 2 * (X)->bw)
+-@@ -92,7 +92,7 @@ struct Client {
+- int basew, baseh, incw, inch, maxw, maxh, minw, minh;
+- int bw, oldbw;
+- unsigned int tags;
+-- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
+-+ int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, issticky;
+- Client *next;
+- Client *snext;
+- Monitor *mon;
+-@@ -211,6 +211,7 @@ static void tagmon(const Arg *arg);
+- static void tile(Monitor *);
+- static void togglebar(const Arg *arg);
+- static void togglefloating(const Arg *arg);
+-+static void togglesticky(const Arg *arg);
+- static void toggletag(const Arg *arg);
+- static void toggleview(const Arg *arg);
+- static void unfocus(Client *c, int setfocus);
+-@@ -1713,6 +1714,15 @@ togglefloating(const Arg *arg)
+- }
+-
+- void
+-+togglesticky(const Arg *arg)
+-+{
+-+ if (!selmon->sel)
+-+ return;
+-+ selmon->sel->issticky = !selmon->sel->issticky;
+-+ arrange(selmon);
+-+}
+-+
+-+void
+- toggletag(const Arg *arg)
+- {
+- unsigned int newtags;