summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2024-09-03 20:32:05 +0400
committerSuleyman Farajli <suleyman@farajli.net>2024-09-03 20:32:05 +0400
commit059830df7684a630dfbcd9c2cc4b8bf0458dc791 (patch)
tree836718c783af4088630760d176cbaf7d26143251
parentc152d21f9c3cc11601a8e40e25244e15529295ad (diff)
scratchpad patch removed
-rw-r--r--config.h4
-rw-r--r--dwm.c34
2 files changed, 0 insertions, 38 deletions
diff --git a/config.h b/config.h
index 7585e55..094c26e 100644
--- a/config.h
+++ b/config.h
@@ -64,8 +64,6 @@ 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 *browsercmd[] = { "qutebrowser", NULL };
-static const char scratchpadname[] = "scratchpad";
-static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "70x24", NULL };
static const char
@@ -106,8 +104,6 @@ static const Key keys[] = {
{ MODKEY, XK_v, focusmaster, {0} },
{ MODKEY|ShiftMask, XK_space, togglefocusfloat, {0} },
- { MODKEY, XK_s, togglescratch, {.v = scratchpadcmd } },
-
{ MODKEY|ShiftMask, XK_w, spawn, {.v = wallpaper } },
{ 0 , XF86XK_MonBrightnessUp , spawn , {.v = light_up}},
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)
@@ -1859,28 +1847,6 @@ togglefullscr(const Arg *arg)
}
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)
{
unsigned int newtags;