From 2cdf3e724680967764b487f173f7ad45802d2a3a Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Tue, 3 Sep 2024 20:32:05 +0400 Subject: scratchpad patch removed --- dwm.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index 1aa10cd..b532113 100644 --- a/dwm.c +++ b/dwm.c @@ -216,7 +216,6 @@ static void tile(Monitor *m); static void togglebar(const Arg *arg); static void togglefloating(const Arg *arg); static void togglefocusfloat(const Arg *arg); -static void togglescratch(const Arg *arg); static void togglefullscr(const Arg *arg); static void toggletag(const Arg *arg); static void toggleview(const Arg *arg); @@ -281,8 +280,6 @@ static Window root, wmcheckwin; /* configuration, allows nested code to access above variables */ #include "config.h" -static unsigned int scratchtag = 1 << LENGTH(tags); - /* compile-time check if all tags fit into an unsigned int bit array. */ struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; }; @@ -1130,14 +1127,6 @@ manage(Window w, XWindowAttributes *wa) c->bw = c->mon->borderpx; - selmon->tagset[selmon->seltags] &= ~scratchtag; - /*if (!strcmp(c->name, scratchpadname)) { - c->mon->tagset[c->mon->seltags] |= c->tags = scratchtag; - c->isfloating = True; - c->x = c->mon->wx + (c->mon->ww / 2 - WIDTH(c) / 2); - c->y = c->mon->wy + (c->mon->wh / 2 - HEIGHT(c) / 2); - }*/ - wc.border_width = c->bw; XConfigureWindow(dpy, w, CWBorderWidth, &wc); XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel); @@ -1761,7 +1750,6 @@ spawn(const Arg *arg) if (arg->v == dmenucmd) dmenumon[0] = '0' + selmon->num; - selmon->tagset[selmon->seltags] &= ~scratchtag; if (fork() == 0) { if (dpy) @@ -1858,28 +1846,6 @@ togglefullscr(const Arg *arg) setfullscreen(selmon->sel, !selmon->sel->isfullscreen); } -void -togglescratch(const Arg *arg) -{ - Client *c; - unsigned int found = 0; - - for (c = selmon->clients; c && !(found = c->tags & scratchtag); c = c->next); - if (found) { - unsigned int newtagset = selmon->tagset[selmon->seltags] ^ scratchtag; - if (newtagset) { - selmon->tagset[selmon->seltags] = newtagset; - focus(NULL); - arrange(selmon); - } - if (ISVISIBLE(c)) { - focus(c); - restack(selmon); - } - } else - spawn(arg); -} - void toggletag(const Arg *arg) { -- cgit v1.2.3