summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2021-09-27 13:43:31 -0500
committerzachir <zachir@librem.one>2021-09-27 13:43:31 -0500
commit60fc9232553a31061c28cf932efb5b4e0c10d80c (patch)
tree688b39ff65bc8c15c393790a3e17e0d25bcc46f0
parentc9d6d1b0a431e600c53aaf65857e1c295c17cea8 (diff)
Re-make patch.diff
-rw-r--r--patch.diff (renamed from dwm-zir-6.2.diff)514
-rw-r--r--patch2.diff194
2 files changed, 136 insertions, 572 deletions
diff --git a/dwm-zir-6.2.diff b/patch.diff
index 779d950..9a54a7b 100644
--- a/dwm-zir-6.2.diff
+++ b/patch.diff
@@ -1,16 +1,27 @@
diff --git a/Makefile b/Makefile
-index 77bcbc0..f837f5c 100644
+index 77bcbc0..6a65b9d 100644
--- a/Makefile
+++ b/Makefile
-@@ -38,7 +38,7 @@ dist: clean
+@@ -37,8 +37,9 @@ dist: clean
+ rm -rf dwm-${VERSION}
install: all
- mkdir -p ${DESTDIR}${PREFIX}/bin
+- mkdir -p ${DESTDIR}${PREFIX}/bin
- cp -f dwm ${DESTDIR}${PREFIX}/bin
++ mkdir -p ${DESTDIR}${PREFIX}/bin ${DESTDIR}${XSESSIONPREFIX}
+ cp -f dwm dwmc ${DESTDIR}${PREFIX}/bin
++ cp -f dwm.desktop ${DESTDIR}${XSESSIONPREFIX}
chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
mkdir -p ${DESTDIR}${MANPREFIX}/man1
sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
+@@ -46,6 +47,7 @@ install: all
+
+ uninstall:
+ rm -f ${DESTDIR}${PREFIX}/bin/dwm\
++ ${DESTDIR}${PREFIX}/bin/dwmc\
+ ${DESTDIR}${MANPREFIX}/man1/dwm.1
+
+ .PHONY: all options clean dist install uninstall
diff --git a/config.def.h b/config.def.h
index 1c0b587..a66fbe2 100644
--- a/config.def.h
@@ -215,318 +226,19 @@ index 1c0b587..a66fbe2 100644
+ { "setlayout", setlayout },
+ { "setlayoutex", setlayoutex },
+};
-diff --git a/config.h b/config.h
-new file mode 100644
-index 0000000..e37feca
---- /dev/null
-+++ b/config.h
-@@ -0,0 +1,301 @@
-+/* See LICENSE file for copyright and license details. */
-+
-+#include <X11/XF86keysym.h>
-+
-+/* appearance */
-+static const unsigned int borderpx = 1; /* border pixel of windows */
-+static const unsigned int gappx = 6; /* gaps between windows */
-+static const unsigned int snap = 32; /* snap pixel */
-+static const int swallowfloating = 0;
-+static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
-+static const unsigned int systrayspacing = 2; /* systray spacing */
-+static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
-+static const int showsystray = 1; /* 0 means no systray */
-+static const int showbar = 1; /* 0 means no bar */
-+static const int topbar = 1; /* 0 means bottom bar */
-+static const char *fonts[] = { "mononoki Nerd Font Mono:size=10", "JoyPixels:size=9" };
-+static const char dmenufont[] = "mononoki Nerd Font Mono:size=10";
-+static const char col_gray1[] = "#222222";
-+static const char col_gray2[] = "#444444";
-+static const char col_gray3[] = "#bbbbbb";
-+static const char col_gray4[] = "#eeeeee";
-+static const char col_cyan[] = "#750000";
-+static const char *colors[][3] = {
-+ /* fg bg border */
-+ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
-+ [SchemeSel] = { col_gray4, col_cyan, col_cyan },
-+};
-+
-+typedef struct {
-+ const char *name;
-+ const void *cmd;
-+} Sp;
-+const char *spcmd1[] = { "st", "-g", "150x50", "-c", "sphtop", "-e", "htop", NULL };
-+const char *spcmd2[] = { "st", "-g", "150x50", "-c", "spterm", NULL };
-+const char *spcmd3[] = { "st", "-g", "150x50", "-c", "sppm", "-e", "pulsemixer", NULL };
-+const char *spcmd4[] = { "st", "-g", "150x50", "-c", "spncmp", "-e", "ncmpcpp", NULL };
-+const char *spcmd5[] = { "st", "-g", "150x50", "-c", "spmutt", "-e", "neomutt", NULL };
-+const char *spcmd6[] = { "st", "-g", "150x50", "-c", "spping", "-e", "ping", "1.1.1.1", NULL };
-+static Sp scratchpads[] = {
-+ { "sphtop", spcmd1 },
-+ { "spterm", spcmd2 },
-+ { "sppm", spcmd3 },
-+ { "spncmp", spcmd4 },
-+ { "spmutt", spcmd5 },
-+ { "spping", spcmd6 },
-+};
-+
-+/* tagging */
-+static const char *tags[] = { " 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9" };
-+
-+static const Rule rules[] = {
-+ /* xprop(1):
-+ * WM_CLASS(STRING) = instance, class
-+ * WM_NAME(STRING) = title
-+ */
-+ /* class instance title tags mask isfloating isterminal noswallow monitor */
-+ { NULL, NULL,"Picture in picture", 511, 1, 0, 0, -1 },
-+ { "ardour-6.2.0",NULL, NULL, 0, 1, 0, 0, -1 },
-+ { "urxvt", NULL, NULL, 0, 0, 1, 0, -1 },
-+ { "URxvt", NULL, NULL, 0, 0, 1, 0, -1 },
-+ { "Ardour-6.2.0",NULL, NULL, 0, 1, 0, 0, -1 },
-+ { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 },
-+ { "st-256color",NULL, NULL, 0, 0, 1, 1, -1 },
-+ { "st", NULL, NULL, 0, 0, 1, 1, -1 },
-+ { "St", NULL, NULL, 0, 0, 1, 1, -1 },
-+ { "tabbed", NULL, NULL, 0, 0, 1, 0, -1 },
-+ { NULL, NULL, "abduco", 0, 0, 1, 0, -1 },
-+ { "Alacritty", NULL, NULL, 0, 0, 1, 0, -1 },
-+ { "Blueman", NULL, NULL, 0, 1, 0, 0, -1 },
-+ { "QjackCtl", NULL, NULL, 0, 1, 0, 0, -1 },
-+ { "qjackctl", NULL, NULL, 0, 1, 0, 0, -1 },
-+ { "catia.py", NULL, NULL, 0, 1, 0, 0, -1 },
-+ { "Catia", NULL, NULL, 0, 1, 0, 0, -1 },
-+ { NULL, "carla",NULL, 1 << 7, 1, 0, 0, -1 },
-+ { NULL, NULL, "Event Tester", 0, 1, 0, 1, -1 },
-+ { "Steam", NULL, NULL, 4, 0, 0, 0, -1 },
-+ { "steam", NULL, NULL, 4, 0, 0, 0, -1 },
-+ { NULL, NULL, "steam", 4, 0, 0, 0, -1 },
-+ { "Lutris", NULL, NULL, 2, 0, 0, 0, -1 },
-+ { "lutris", NULL, NULL, 2, 0, 0, 0, -1 },
-+ { "sphtop", NULL, NULL, SPTAG(0), 1, 1, 1, -1 },
-+ { "spterm", NULL, NULL, SPTAG(1), 1, 1, 1, -1 },
-+ { "sppm", NULL, NULL, SPTAG(2), 1, 1, 1, -1 },
-+ { "spncmp", NULL, NULL, SPTAG(3), 1, 1, 1, -1 },
-+ { "spmutt", NULL, NULL, SPTAG(4), 1, 1, 1, -1 },
-+ { "spping", NULL, NULL, SPTAG(5), 1, 1, 1, -1 },
-+ { NULL, "monero-wallet-gui",NULL, 256, 1, 0, 0, -1 },
-+};
-+
-+/* layout(s) */
-+static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
-+static const int nmaster = 1; /* number of clients in master area */
-+static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
-+static int attachbelow = 1; /* 1 means attach after the currently active window */
-+
-+#include "tcl.c"
-+static const Layout layouts[] = {
-+ /* symbol arrange function */
-+ { "[]=", tile }, /* first entry is default */
-+ { "><>", NULL }, /* no layout function means floating behavior */
-+ { "[M]", monocle },
-+ { "|||", tcl },
-+};
-+
-+/* key definitions */
-+#define MODKEY Mod3Mask
-+#define TAGKEYS(KEY,TAG) \
-+ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
-+ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
-+ { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
-+ { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
-+
-+/* helper for spawning shell commands in the pre dwm-5.0 fashion */
-+#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
-+
-+/* commands */
-+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 *rmenucmd[] = { "/usr/sbin/j4-dmenu-desktop", NULL }; */
-+/* static const char *passmenu[] = { "passmenu", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; */
-+static const char *termcmd[] = { "urxvtc", NULL };
-+/* static const char *termcmd[] = { "alacritty", NULL }; */
-+static const char *sxhkdsig[] = { "pkill", "-USR1", "sxhkd", NULL };
-+/* static const char *mpdtoggle[] = { "playerctl", "--player=mpd,mpv,%any", "play-pause", NULL }; */
-+/* static const char *mpdnext[] = { "playerctl", "--player=mpd,mpv,%any", "next", NULL }; */
-+/* static const char *mpdprev[] = { "playerctl", "--player=mpd,mpv,%any", "previous", NULL }; */
-+/* static const char *plytoggle[] = { "playerctl", "--player=%any,mpd", "play-pause", NULL }; */
-+/* static const char *plyfwd[] = { "playerctl", "--player=%any,mpd", "position 5+", NULL }; */
-+/* static const char *plybck[] = { "playerctl", "--player=%any,mpd", "position 5-", NULL }; */
-+/* static const char *blightup[] = { "light", "-A", "1", NULL }; */
-+/* static const char *blightdown[] = { "light", "-U", "1", NULL }; */
-+/* static const char *audioup[] = { "volsv", "-i", NULL }; */
-+/* static const char *audiodown[] = { "volsv", "-d", NULL }; */
-+/* static const char *audiomute[] = { "volsv", "-t", NULL }; */
-+/* static const char *micmute[] = { "pamixer", "--source", "1", "-t", NULL }; */
-+/* static const char *lockscr[] = { "xscreensaver-command", "-lock", NULL }; */
-+/* static const char *xidletog[] = { "xidletog", NULL }; */
-+/* static const char *xkillcmd[] = { "xkill", NULL }; */
-+
-+static Key keys[] = {
-+ /* modifier key function argument */
-+ /* { MODKEY, XK_d, spawn, {.v = dmenucmd } }, */
-+ /* { MODKEY, XK_r, spawn, {.v = rmenucmd } }, */
-+ /* { MODKEY, XK_p, spawn, {.v = passmenu } }, */
-+ /* { MODKEY, XK_c, spawn, {.v = xidletog } }, */
-+ /* { MODKEY, XK_x, spawn, {.v = xkillcmd } }, */
-+ { MODKEY, XK_Return, spawn, {.v = termcmd } },
-+ { MODKEY|ControlMask, XK_z, togglescratch, {.ui = 0 } },
-+ { MODKEY|ControlMask, XK_x, togglescratch, {.ui = 1 } },
-+ { MODKEY|ControlMask, XK_c, togglescratch, {.ui = 2 } },
-+ { MODKEY|ControlMask, XK_b, togglescratch, {.ui = 3 } },
-+ { MODKEY|ControlMask, XK_a, togglescratch, {.ui = 4 } },
-+ { MODKEY|ControlMask, XK_s, togglescratch, {.ui = 5 } },
-+ { MODKEY, XK_Escape, spawn, {.v = sxhkdsig } },
-+ // { 0, XF86XK_AudioPlay, spawn, {.v = mpdtoggle } },
-+ // { 0, XF86XK_AudioNext, spawn, {.v = mpdnext } },
-+ // { 0, XF86XK_AudioPrev, spawn, {.v = mpdprev } },
-+ // { ShiftMask, XF86XK_AudioPlay, spawn, {.v = plytoggle } },
-+ // { ShiftMask, XF86XK_AudioNext, spawn, {.v = plyfwd } },
-+ // { ShiftMask, XF86XK_AudioPrev, spawn, {.v = plybck } },
-+ // { 0, XF86XK_MonBrightnessUp, spawn, {.v = blightup } },
-+ // { 0, XF86XK_MonBrightnessDown, spawn, {.v = blightdown } },
-+ // { 0, XF86XK_AudioLowerVolume, spawn, {.v = audiodown } },
-+ // { 0, XF86XK_AudioRaiseVolume, spawn, {.v = audioup } },
-+ // { 0, XF86XK_AudioMute, spawn, {.v = audiomute } },
-+ // { 0, XF86XK_AudioMicMute, spawn, {.v = micmute } },
-+ // { Mod4Mask, XK_l, spawn, {.v = lockscr } },
-+ { MODKEY, XK_b, togglebar, {0} },
-+ { MODKEY, XK_j, focusstack, {.i = +1 } },
-+ { MODKEY, XK_k, focusstack, {.i = -1 } },
-+ { MODKEY|ShiftMask, XK_j, pushdown, {.i = +1 } },
-+ { MODKEY|ShiftMask, XK_k, pushup, {.i = -1 } },
-+ { MODKEY|ControlMask, XK_k, setcfact, {.f = +0.25} },
-+ { MODKEY|ControlMask, XK_j, setcfact, {.f = -0.25} },
-+ { MODKEY|ControlMask, XK_o, setcfact, {.f = 0.00} },
-+ { MODKEY|ShiftMask, XK_h, incnmaster, {.i = +1 } },
-+ { MODKEY|ShiftMask, XK_l, incnmaster, {.i = -1 } },
-+ { MODKEY, XK_h, setmfact, {.f = -0.05} },
-+ { MODKEY, XK_l, setmfact, {.f = +0.05} },
-+ { MODKEY|ShiftMask, XK_Return, zoom, {0} },
-+ { MODKEY, XK_Tab, view, {0} },
-+ { MODKEY|ShiftMask, XK_q, killclient, {0} },
-+ { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
-+ { MODKEY, XK_s, setlayout, {.v = &layouts[1]} },
-+ { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
-+ { MODKEY, XK_e, setlayout, {.v = &layouts[3]} },
-+ /* { MODKEY|ShiftMask, XK_space, setlayout, {-1} }, */
-+ { MODKEY, XK_space, togglefloating, {0} },
-+ { MODKEY, XK_f, togglefullscr, {0} },
-+ { MODKEY, XK_0, view, {.ui = ~0 } },
-+ { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
-+ { MODKEY|ControlMask, XK_comma, focusmon, {.i = -1 } },
-+ { MODKEY|ControlMask, XK_period, focusmon, {.i = +1 } },
-+ { MODKEY|ControlMask|ShiftMask, XK_comma, tagmon, {.i = -1 } },
-+ { MODKEY|ControlMask|ShiftMask, XK_period, tagmon, {.i = +1 } },
-+ TAGKEYS( XK_1, 0)
-+ TAGKEYS( XK_2, 1)
-+ TAGKEYS( XK_3, 2)
-+ TAGKEYS( XK_4, 3)
-+ TAGKEYS( XK_5, 4)
-+ TAGKEYS( XK_6, 5)
-+ TAGKEYS( XK_7, 6)
-+ TAGKEYS( XK_8, 7)
-+ TAGKEYS( XK_9, 8)
-+ { MODKEY|ShiftMask, XK_e, quit, {0} },
-+ { MODKEY|ShiftMask, XK_r, quit, {1} },
-+ { MODKEY|ShiftMask, XK_Tab, toggleAttachBelow, {0} },
-+};
-+
-+/* button definitions */
-+/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
-+static Button buttons[] = {
-+ /* click event mask button function argument */
-+ { ClkLtSymbol, 0, Button1, setlayout, {0} },
-+ { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
-+ { ClkWinTitle, 0, Button2, zoom, {0} },
-+ { ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} },
-+ { ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} },
-+ { ClkStatusText, 0, Button3, sigdwmblocks, {.i = 3} },
-+ { ClkClientWin, MODKEY, Button1, movemouse, {0} },
-+ { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
-+ { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
-+ { ClkTagBar, 0, Button1, view, {0} },
-+ { ClkTagBar, 0, Button3, toggleview, {0} },
-+ { ClkTagBar, MODKEY, Button1, tag, {0} },
-+ { ClkTagBar, MODKEY, Button3, toggletag, {0} },
-+};
-+
-+void
-+setlayoutex(const Arg *arg)
-+{
-+ setlayout(&((Arg) { .v = &layouts[arg->i] }));
-+}
-+
-+void
-+viewex(const Arg *arg)
-+{
-+ view(&((Arg) { .ui = 1 << arg->ui }));
-+}
-+
-+void
-+viewall(const Arg *arg)
-+{
-+ view(&((Arg){.ui = ~0}));
-+}
-+
-+void
-+toggleviewex(const Arg *arg)
-+{
-+ toggleview(&((Arg) { .ui = 1 << arg->ui }));
-+}
-+
-+void
-+tagex(const Arg *arg)
-+{
-+ tag(&((Arg) { .ui = 1 << arg->ui }));
-+}
-+
-+void
-+toggletagex(const Arg *arg)
-+{
-+ toggletag(&((Arg) { .ui = 1 << arg->ui }));
-+}
-+
-+void
-+tagall(const Arg *arg)
-+{
-+ tag(&((Arg){.ui = ~0}));
-+}
-+
-+/* signal definitions */
-+/* signum must be greater than 0 */
-+/* trigger signals using `xsetroot -name "fsignal:<signame> [<type> <value>]"` */
-+static Signal signals[] = {
-+ /* signum function */
-+ { "togglescratch", togglescratch },
-+ { "focusstack", focusstack },
-+ { "setmfact", setmfact },
-+ { "togglebar", togglebar },
-+ { "incnmaster", incnmaster },
-+ { "togglefloating", togglefloating },
-+ { "togglefullscr", togglefullscr },
-+ { "focusmon", focusmon },
-+ { "tagmon", tagmon },
-+ { "zoom", zoom },
-+ { "view", view },
-+ { "viewall", viewall },
-+ { "viewex", viewex },
-+ { "toggleview", view },
-+ { "toggleviewex", toggleviewex },
-+ { "tag", tag },
-+ { "tagall", tagall },
-+ { "tagex", tagex },
-+ { "toggletag", tag },
-+ { "toggletagex", toggletagex },
-+ { "killclient", killclient },
-+ { "quit", quit },
-+ { "setlayout", setlayout },
-+ { "setlayoutex", setlayoutex },
-+};
-+
diff --git a/config.mk b/config.mk
-index 6d36cb7..5e93cfd 100644
+index 6d36cb7..dbbc526 100644
--- a/config.mk
+++ b/config.mk
-@@ -22,7 +22,7 @@ FREETYPEINC = /usr/include/freetype2
+@@ -6,6 +6,7 @@ VERSION = 6.2
+ # paths
+ PREFIX = /usr/local
+ MANPREFIX = ${PREFIX}/share/man
++XSESSIONPREFIX = /usr/share/xsessions
+
+ X11INC = /usr/X11R6/include
+ X11LIB = /usr/X11R6/lib
+@@ -22,7 +23,7 @@ FREETYPEINC = /usr/include/freetype2
# includes and libs
INCS = -I${X11INC} -I${FREETYPEINC}
@@ -574,7 +286,7 @@ index 13b3729..bf742fd 100644
.BR dmenu (1),
.BR st (1)
diff --git a/dwm.c b/dwm.c
-index 4465af1..603497c 100644
+index 4465af1..49b0aa3 100644
--- a/dwm.c
+++ b/dwm.c
@@ -40,6 +40,8 @@
@@ -712,7 +424,7 @@ index 4465af1..603497c 100644
static int gettextprop(Window w, Atom atom, char *text, unsigned int size);
static void grabbuttons(Client *c, int focused);
static void grabkeys(void);
-@@ -185,32 +232,46 @@ static void motionnotify(XEvent *e);
+@@ -185,32 +232,48 @@ static void motionnotify(XEvent *e);
static void movemouse(const Arg *arg);
static Client *nexttiled(Client *c);
static void pop(Client *);
@@ -720,6 +432,8 @@ index 4465af1..603497c 100644
static void propertynotify(XEvent *e);
+static void pushdown(const Arg *arg);
+static void pushup(const Arg *arg);
++static void pushmdown(const Arg *arg);
++static void pushmup(const Arg *arg);
static void quit(const Arg *arg);
static Monitor *recttomon(int x, int y, int w, int h);
+static void removesystrayicon(Client *i);
@@ -760,7 +474,7 @@ index 4465af1..603497c 100644
static void toggletag(const Arg *arg);
static void toggleview(const Arg *arg);
static void unfocus(Client *c, int setfocus);
-@@ -223,20 +284,36 @@ static int updategeom(void);
+@@ -223,20 +286,36 @@ static int updategeom(void);
static void updatenumlockmask(void);
static void updatesizehints(Client *c);
static void updatestatus(void);
@@ -797,7 +511,7 @@ index 4465af1..603497c 100644
static int screen;
static int sw, sh; /* X display screen geometry width, height */
static int bh, blw = 0; /* bar geometry */
-@@ -257,9 +334,11 @@ static void (*handler[LASTEvent]) (XEvent *) = {
+@@ -257,9 +336,11 @@ static void (*handler[LASTEvent]) (XEvent *) = {
[MapRequest] = maprequest,
[MotionNotify] = motionnotify,
[PropertyNotify] = propertynotify,
@@ -810,7 +524,7 @@ index 4465af1..603497c 100644
static int running = 1;
static Cur *cursor[CurLast];
static Clr **scheme;
-@@ -268,6 +347,8 @@ static Drw *drw;
+@@ -268,6 +349,8 @@ static Drw *drw;
static Monitor *mons, *selmon;
static Window root, wmcheckwin;
@@ -819,7 +533,7 @@ index 4465af1..603497c 100644
/* configuration, allows nested code to access above variables */
#include "config.h"
-@@ -285,6 +366,7 @@ applyrules(Client *c)
+@@ -285,6 +368,7 @@ applyrules(Client *c)
XClassHint ch = { NULL, NULL };
/* rule matching */
@@ -827,7 +541,7 @@ index 4465af1..603497c 100644
c->isfloating = 0;
c->tags = 0;
XGetClassHint(dpy, c->win, &ch);
-@@ -297,8 +379,15 @@ applyrules(Client *c)
+@@ -297,8 +381,15 @@ applyrules(Client *c)
&& (!r->class || strstr(class, r->class))
&& (!r->instance || strstr(instance, r->instance)))
{
@@ -843,7 +557,7 @@ index 4465af1..603497c 100644
for (m = mons; m && m->num != r->monitor; m = m->next);
if (m)
c->mon = m;
-@@ -308,7 +397,7 @@ applyrules(Client *c)
+@@ -308,7 +399,7 @@ applyrules(Client *c)
XFree(ch.res_class);
if (ch.res_name)
XFree(ch.res_name);
@@ -852,7 +566,7 @@ index 4465af1..603497c 100644
}
int
-@@ -405,6 +494,26 @@ attach(Client *c)
+@@ -405,6 +496,26 @@ attach(Client *c)
c->next = c->mon->clients;
c->mon->clients = c;
}
@@ -879,7 +593,7 @@ index 4465af1..603497c 100644
void
attachstack(Client *c)
-@@ -413,6 +522,61 @@ attachstack(Client *c)
+@@ -413,6 +524,61 @@ attachstack(Client *c)
c->mon->stack = c;
}
@@ -941,7 +655,7 @@ index 4465af1..603497c 100644
void
buttonpress(XEvent *e)
{
-@@ -439,9 +603,26 @@ buttonpress(XEvent *e)
+@@ -439,9 +605,26 @@ buttonpress(XEvent *e)
arg.ui = 1 << i;
} else if (ev->x < x + blw)
click = ClkLtSymbol;
@@ -970,7 +684,7 @@ index 4465af1..603497c 100644
click = ClkWinTitle;
} else if ((c = wintoclient(ev->window))) {
focus(c);
-@@ -482,6 +663,11 @@ cleanup(void)
+@@ -482,6 +665,11 @@ cleanup(void)
XUngrabKey(dpy, AnyKey, AnyModifier, root);
while (mons)
cleanupmon(mons);
@@ -982,7 +696,7 @@ index 4465af1..603497c 100644
for (i = 0; i < CurLast; i++)
drw_cur_free(drw, cursor[i]);
for (i = 0; i < LENGTH(colors); i++)
-@@ -512,9 +698,57 @@ cleanupmon(Monitor *mon)
+@@ -512,9 +700,57 @@ cleanupmon(Monitor *mon)
void
clientmessage(XEvent *e)
{
@@ -1040,7 +754,7 @@ index 4465af1..603497c 100644
if (!c)
return;
if (cme->message_type == netatom[NetWMState]) {
-@@ -567,7 +801,7 @@ configurenotify(XEvent *e)
+@@ -567,7 +803,7 @@ configurenotify(XEvent *e)
for (c = m->clients; c; c = c->next)
if (c->isfullscreen)
resizeclient(c, m->mx, m->my, m->mw, m->mh);
@@ -1049,7 +763,7 @@ index 4465af1..603497c 100644
}
focus(NULL);
arrange(NULL);
-@@ -627,6 +861,19 @@ configurerequest(XEvent *e)
+@@ -627,6 +863,19 @@ configurerequest(XEvent *e)
XSync(dpy, False);
}
@@ -1069,7 +783,7 @@ index 4465af1..603497c 100644
Monitor *
createmon(void)
{
-@@ -652,6 +899,13 @@ destroynotify(XEvent *e)
+@@ -652,6 +901,13 @@ destroynotify(XEvent *e)
if ((c = wintoclient(ev->window)))
unmanage(c, 1);
@@ -1083,7 +797,7 @@ index 4465af1..603497c 100644
}
void
-@@ -695,19 +949,24 @@ dirtomon(int dir)
+@@ -695,19 +951,24 @@ dirtomon(int dir)
void
drawbar(Monitor *m)
{
@@ -1111,7 +825,7 @@ index 4465af1..603497c 100644
for (c = m->clients; c; c = c->next) {
occ |= c->tags;
if (c->isurgent)
-@@ -715,20 +974,25 @@ drawbar(Monitor *m)
+@@ -715,20 +976,25 @@ drawbar(Monitor *m)
}
x = 0;
for (i = 0; i < LENGTH(tags); i++) {
@@ -1142,7 +856,7 @@ index 4465af1..603497c 100644
if (m->sel) {
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
-@@ -739,7 +1003,7 @@ drawbar(Monitor *m)
+@@ -739,7 +1005,7 @@ drawbar(Monitor *m)
drw_rect(drw, x, 0, w, bh, 1, 1);
}
}
@@ -1151,7 +865,7 @@ index 4465af1..603497c 100644
}
void
-@@ -776,8 +1040,21 @@ expose(XEvent *e)
+@@ -776,8 +1042,21 @@ expose(XEvent *e)
Monitor *m;
XExposeEvent *ev = &e->xexpose;
@@ -1174,7 +888,7 @@ index 4465af1..603497c 100644
}
void
-@@ -862,15 +1139,34 @@ getatomprop(Client *c, Atom prop)
+@@ -862,15 +1141,34 @@ getatomprop(Client *c, Atom prop)
unsigned long dl;
unsigned char *p = NULL;
Atom da, atom = None;
@@ -1210,7 +924,7 @@ index 4465af1..603497c 100644
int
getrootptr(int *x, int *y)
{
-@@ -899,6 +1195,16 @@ getstate(Window w)
+@@ -899,6 +1197,16 @@ getstate(Window w)
return result;
}
@@ -1227,7 +941,7 @@ index 4465af1..603497c 100644
int
gettextprop(Window w, Atom atom, char *text, unsigned int size)
{
-@@ -998,12 +1304,55 @@ keypress(XEvent *e)
+@@ -998,12 +1306,55 @@ keypress(XEvent *e)
keys[i].func(&(keys[i].arg));
}
@@ -1284,7 +998,7 @@ index 4465af1..603497c 100644
XGrabServer(dpy);
XSetErrorHandler(xerrordummy);
XSetCloseDownMode(dpy, DestroyAll);
-@@ -1017,18 +1366,20 @@ killclient(const Arg *arg)
+@@ -1017,18 +1368,20 @@ killclient(const Arg *arg)
void
manage(Window w, XWindowAttributes *wa)
{
@@ -1306,7 +1020,7 @@ index 4465af1..603497c 100644
updatetitle(c);
if (XGetTransientForHint(dpy, w, &trans) && (t = wintoclient(trans))) {
-@@ -1037,6 +1388,7 @@ manage(Window w, XWindowAttributes *wa)
+@@ -1037,6 +1390,7 @@ manage(Window w, XWindowAttributes *wa)
} else {
c->mon = selmon;
applyrules(c);
@@ -1314,7 +1028,7 @@ index 4465af1..603497c 100644
}
if (c->x + WIDTH(c) > c->mon->mx + c->mon->mw)
-@@ -1062,7 +1414,10 @@ manage(Window w, XWindowAttributes *wa)
+@@ -1062,7 +1416,10 @@ manage(Window w, XWindowAttributes *wa)
c->isfloating = c->oldstate = trans != None || c->isfixed;
if (c->isfloating)
XRaiseWindow(dpy, c->win);
@@ -1326,7 +1040,7 @@ index 4465af1..603497c 100644
attachstack(c);
XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend,
(unsigned char *) &(c->win), 1);
-@@ -1073,6 +1428,8 @@ manage(Window w, XWindowAttributes *wa)
+@@ -1073,6 +1430,8 @@ manage(Window w, XWindowAttributes *wa)
c->mon->sel = c;
arrange(c->mon);
XMapWindow(dpy, c->win);
@@ -1335,7 +1049,7 @@ index 4465af1..603497c 100644
focus(NULL);
}
-@@ -1091,6 +1448,12 @@ maprequest(XEvent *e)
+@@ -1091,6 +1450,12 @@ maprequest(XEvent *e)
{
static XWindowAttributes wa;
XMapRequestEvent *ev = &e->xmaprequest;
@@ -1348,7 +1062,7 @@ index 4465af1..603497c 100644
if (!XGetWindowAttributes(dpy, ev->window, &wa))
return;
-@@ -1208,6 +1571,16 @@ pop(Client *c)
+@@ -1208,6 +1573,16 @@ pop(Client *c)
arrange(c->mon);
}
@@ -1365,7 +1079,7 @@ index 4465af1..603497c 100644
void
propertynotify(XEvent *e)
{
-@@ -1215,8 +1588,21 @@ propertynotify(XEvent *e)
+@@ -1215,8 +1590,21 @@ propertynotify(XEvent *e)
Window trans;
XPropertyEvent *ev = &e->xproperty;
@@ -1389,7 +1103,7 @@ index 4465af1..603497c 100644
else if (ev->state == PropertyDelete)
return; /* ignore */
else if ((c = wintoclient(ev->window))) {
-@@ -1245,9 +1631,41 @@ propertynotify(XEvent *e)
+@@ -1245,9 +1633,85 @@ propertynotify(XEvent *e)
}
}
@@ -1424,6 +1138,50 @@ index 4465af1..603497c 100644
+ arrange(selmon);
+}
+
++void
++pushmdown(const Arg *arg) {
++ Client *sel = selmon->sel, *c;
++
++ if(!sel || sel->isfloating || sel == nexttiled(selmon->clients))
++ return;
++ if((c = nexttiled(sel->next))) {
++ detach(sel);
++ sel->next = c->next;
++ c->next = sel;
++ } else {
++ detach(sel);
++ attach(sel);
++ }
++ focus(sel);
++ arrange(selmon);
++}
++
++void
++pushmup(const Arg *arg) {
++ Client *sel = selmon->sel, *c;
++
++ if(!sel || sel->isfloating)
++ return;
++ if((c = prevtiled(sel))) {
++ detach(sel);
++ sel->next = c;
++ if(selmon->clients == c)
++ selmon->clients = sel;
++ else {
++ for(c = selmon->clients; c->next != sel->next; c = c->next);
++ c->next = sel;
++ }
++ } else {
++ for(c = sel; c->next; c = c->next);
++ detach(sel);
++ sel->next = NULL;
++ c->next = sel;
++ }
++ focus(sel);
++ arrange(selmon);
++}
++
++
void
quit(const Arg *arg)
{
@@ -1431,7 +1189,7 @@ index 4465af1..603497c 100644
running = 0;
}
-@@ -1265,6 +1683,20 @@ recttomon(int x, int y, int w, int h)
+@@ -1265,6 +1729,20 @@ recttomon(int x, int y, int w, int h)
return r;
}
@@ -1452,7 +1210,7 @@ index 4465af1..603497c 100644
void
resize(Client *c, int x, int y, int w, int h, int interact)
{
-@@ -1272,16 +1704,48 @@ resize(Client *c, int x, int y, int w, int h, int interact)
+@@ -1272,16 +1750,48 @@ resize(Client *c, int x, int y, int w, int h, int interact)
resizeclient(c, x, y, w, h);
}
@@ -1505,7 +1263,7 @@ index 4465af1..603497c 100644
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
configure(c);
XSync(dpy, False);
-@@ -1344,6 +1808,19 @@ resizemouse(const Arg *arg)
+@@ -1344,6 +1854,19 @@ resizemouse(const Arg *arg)
}
}
@@ -1525,7 +1283,7 @@ index 4465af1..603497c 100644
void
restack(Monitor *m)
{
-@@ -1380,10 +1857,18 @@ run(void)
+@@ -1380,10 +1903,18 @@ run(void)
handler[ev.type](&ev); /* call handler */
}
@@ -1544,7 +1302,7 @@ index 4465af1..603497c 100644
Window d1, d2, *wins = NULL;
XWindowAttributes wa;
-@@ -1394,6 +1879,8 @@ scan(void)
+@@ -1394,6 +1925,8 @@ scan(void)
continue;
if (wa.map_state == IsViewable || getstate(wins[i]) == IconicState)
manage(wins[i], &wa);
@@ -1553,7 +1311,7 @@ index 4465af1..603497c 100644
}
for (i = 0; i < num; i++) { /* now the transients */
if (!XGetWindowAttributes(dpy, wins[i], &wa))
-@@ -1405,6 +1892,7 @@ scan(void)
+@@ -1405,6 +1938,7 @@ scan(void)
if (wins)
XFree(wins);
}
@@ -1561,7 +1319,7 @@ index 4465af1..603497c 100644
}
void
-@@ -1417,7 +1905,10 @@ sendmon(Client *c, Monitor *m)
+@@ -1417,7 +1951,10 @@ sendmon(Client *c, Monitor *m)
detachstack(c);
c->mon = m;
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
@@ -1573,7 +1331,7 @@ index 4465af1..603497c 100644
attachstack(c);
focus(NULL);
arrange(NULL);
-@@ -1433,26 +1924,36 @@ setclientstate(Client *c, long state)
+@@ -1433,26 +1970,36 @@ setclientstate(Client *c, long state)
}
int
@@ -1621,7 +1379,7 @@ index 4465af1..603497c 100644
}
return exists;
}
-@@ -1466,7 +1967,7 @@ setfocus(Client *c)
+@@ -1466,7 +2013,7 @@ setfocus(Client *c)
XA_WINDOW, 32, PropModeReplace,
(unsigned char *) &(c->win), 1);
}
@@ -1630,7 +1388,7 @@ index 4465af1..603497c 100644
}
void
-@@ -1511,6 +2012,23 @@ setlayout(const Arg *arg)
+@@ -1511,6 +2058,23 @@ setlayout(const Arg *arg)
drawbar(selmon);
}
@@ -1654,7 +1412,7 @@ index 4465af1..603497c 100644
/* arg > 1.0 will set mfact absolutely */
void
setmfact(const Arg *arg)
-@@ -1536,6 +2054,9 @@ setup(void)
+@@ -1536,6 +2100,9 @@ setup(void)
/* clean up any zombies immediately */
sigchld(0);
@@ -1664,7 +1422,7 @@ index 4465af1..603497c 100644
/* init screen */
screen = DefaultScreen(dpy);
sw = DisplayWidth(dpy, screen);
-@@ -1555,6 +2076,10 @@ setup(void)
+@@ -1555,6 +2122,10 @@ setup(void)
wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False);
netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False);
netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
@@ -1675,7 +1433,7 @@ index 4465af1..603497c 100644
netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False);
netatom[NetWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False);
-@@ -1562,6 +2087,9 @@ setup(void)
+@@ -1562,6 +2133,9 @@ setup(void)
netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
@@ -1685,7 +1443,7 @@ index 4465af1..603497c 100644
/* init cursors */
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
-@@ -1570,6 +2098,8 @@ setup(void)
+@@ -1570,6 +2144,8 @@ setup(void)
scheme = ecalloc(LENGTH(colors), sizeof(Clr *));
for (i = 0; i < LENGTH(colors); i++)
scheme[i] = drw_scm_create(drw, colors[i], 3);
@@ -1694,7 +1452,7 @@ index 4465af1..603497c 100644
/* init bars */
updatebars();
updatestatus();
-@@ -1616,6 +2146,10 @@ showhide(Client *c)
+@@ -1616,6 +2192,10 @@ showhide(Client *c)
if (!c)
return;
if (ISVISIBLE(c)) {
@@ -1705,7 +1463,7 @@ index 4465af1..603497c 100644
/* show clients top down */
XMoveWindow(dpy, c->win, c->x, c->y);
if ((!c->mon->lt[c->mon->sellt]->arrange || c->isfloating) && !c->isfullscreen)
-@@ -1636,6 +2170,37 @@ sigchld(int unused)
+@@ -1636,6 +2216,37 @@ sigchld(int unused)
while (0 < waitpid(-1, NULL, WNOHANG));
}
@@ -1743,7 +1501,7 @@ index 4465af1..603497c 100644
void
spawn(const Arg *arg)
{
-@@ -1674,9 +2239,15 @@ void
+@@ -1674,9 +2285,15 @@ void
tile(Monitor *m)
{
unsigned int i, n, h, mw, my, ty;
@@ -1760,7 +1518,7 @@ index 4465af1..603497c 100644
if (n == 0)
return;
-@@ -1686,13 +2257,15 @@ tile(Monitor *m)
+@@ -1686,13 +2303,15 @@ tile(Monitor *m)
mw = m->ww;
for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
if (i < m->nmaster) {
@@ -1778,7 +1536,7 @@ index 4465af1..603497c 100644
}
}
-@@ -1701,7 +2274,18 @@ togglebar(const Arg *arg)
+@@ -1701,7 +2320,18 @@ togglebar(const Arg *arg)
{
selmon->showbar = !selmon->showbar;
updatebarpos(selmon);
@@ -1798,7 +1556,7 @@ index 4465af1..603497c 100644
arrange(selmon);
}
-@@ -1719,6 +2303,39 @@ togglefloating(const Arg *arg)
+@@ -1719,6 +2349,39 @@ togglefloating(const Arg *arg)
arrange(selmon);
}
@@ -1838,7 +1596,7 @@ index 4465af1..603497c 100644
void
toggletag(const Arg *arg)
{
-@@ -1765,6 +2382,20 @@ unmanage(Client *c, int destroyed)
+@@ -1765,6 +2428,20 @@ unmanage(Client *c, int destroyed)
Monitor *m = c->mon;
XWindowChanges wc;
@@ -1859,7 +1617,7 @@ index 4465af1..603497c 100644
detach(c);
detachstack(c);
if (!destroyed) {
-@@ -1779,9 +2410,12 @@ unmanage(Client *c, int destroyed)
+@@ -1779,9 +2456,12 @@ unmanage(Client *c, int destroyed)
XUngrabServer(dpy);
}
free(c);
@@ -1875,7 +1633,7 @@ index 4465af1..603497c 100644
}
void
-@@ -1796,11 +2430,18 @@ unmapnotify(XEvent *e)
+@@ -1796,11 +2476,18 @@ unmapnotify(XEvent *e)
else
unmanage(c, 0);
}
@@ -1894,7 +1652,7 @@ index 4465af1..603497c 100644
Monitor *m;
XSetWindowAttributes wa = {
.override_redirect = True,
-@@ -1811,10 +2452,15 @@ updatebars(void)
+@@ -1811,10 +2498,15 @@ updatebars(void)
for (m = mons; m; m = m->next) {
if (m->barwin)
continue;
@@ -1911,7 +1669,7 @@ index 4465af1..603497c 100644
XMapRaised(dpy, m->barwin);
XSetClassHint(dpy, m->barwin, &ch);
}
-@@ -1897,7 +2543,10 @@ updategeom(void)
+@@ -1897,7 +2589,10 @@ updategeom(void)
m->clients = c->next;
detachstack(c);
c->mon = mons;
@@ -1923,7 +1681,7 @@ index 4465af1..603497c 100644
attachstack(c);
}
if (m == selmon)
-@@ -1987,9 +2636,126 @@ updatesizehints(Client *c)
+@@ -1987,9 +2682,126 @@ updatesizehints(Client *c)
void
updatestatus(void)
{
@@ -2051,7 +1809,7 @@ index 4465af1..603497c 100644
}
void
-@@ -2044,6 +2810,110 @@ view(const Arg *arg)
+@@ -2044,6 +2856,110 @@ view(const Arg *arg)
arrange(selmon);
}
@@ -2162,7 +1920,7 @@ index 4465af1..603497c 100644
Client *
wintoclient(Window w)
{
-@@ -2057,6 +2927,16 @@ wintoclient(Window w)
+@@ -2057,6 +2973,16 @@ wintoclient(Window w)
return NULL;
}
@@ -2179,7 +1937,7 @@ index 4465af1..603497c 100644
Monitor *
wintomon(Window w)
{
-@@ -2110,18 +2990,58 @@ xerrorstart(Display *dpy, XErrorEvent *ee)
+@@ -2110,18 +3036,58 @@ xerrorstart(Display *dpy, XErrorEvent *ee)
return -1;
}
@@ -2242,7 +2000,7 @@ index 4465af1..603497c 100644
}
int
-@@ -2135,6 +3055,8 @@ main(int argc, char *argv[])
+@@ -2135,6 +3101,8 @@ main(int argc, char *argv[])
fputs("warning: no locale support\n", stderr);
if (!(dpy = XOpenDisplay(NULL)))
die("dwm: cannot open display");
@@ -2251,7 +2009,7 @@ index 4465af1..603497c 100644
checkotherwm();
setup();
#ifdef __OpenBSD__
-@@ -2142,7 +3064,9 @@ main(int argc, char *argv[])
+@@ -2142,7 +3110,9 @@ main(int argc, char *argv[])
die("pledge");
#endif /* __OpenBSD__ */
scan();
@@ -2279,7 +2037,7 @@ index 0000000..5a6021f
+Categories=Application;
diff --git a/dwmc b/dwmc
new file mode 100755
-index 0000000..5ff8dbc
+index 0000000..ac2d0e6
--- /dev/null
+++ b/dwmc
@@ -0,0 +1,40 @@
@@ -2292,7 +2050,7 @@ index 0000000..5ff8dbc
+case $# in
+1)
+ case $1 in
-+ setlayout | view | viewall | togglebar | togglefloating | zoom | killclient | quit)
++ setlayout | view | viewall | togglebar | togglefloating | zoom | killclient)
+ signal $1
+ ;;
+ *)
@@ -2303,10 +2061,10 @@ index 0000000..5ff8dbc
+ ;;
+2)
+ case $1 in
-+ view)
++ view | togglescratch)
+ signal $1 ui $2
+ ;;
-+ viewex | toggleviewex | tagex | toggletagex | setlayoutex | focusstack | incnmaster | focusmon | tagmon)
++ viewex | toggleviewex | tagex | toggletagex | setlayoutex | focusstack | incnmaster | focusmon | tagmon | quit)
+ signal $1 i $2
+ ;;
+ setmfact)
diff --git a/patch2.diff b/patch2.diff
deleted file mode 100644
index b80632f..0000000
--- a/patch2.diff
+++ /dev/null
@@ -1,194 +0,0 @@
-diff --git a/config.h b/config.h
-index e37feca..cea96be 100644
---- a/config.h
-+++ b/config.h
-@@ -15,15 +15,15 @@ static const int showbar = 1; /* 0 means no bar */
- static const int topbar = 1; /* 0 means bottom bar */
- static const char *fonts[] = { "mononoki Nerd Font Mono:size=10", "JoyPixels:size=9" };
- static const char dmenufont[] = "mononoki Nerd Font Mono:size=10";
--static const char col_gray1[] = "#222222";
--static const char col_gray2[] = "#444444";
-+static const char col_gray1[] = "#000000";
-+static const char col_gray2[] = "#000000";
- static const char col_gray3[] = "#bbbbbb";
- static const char col_gray4[] = "#eeeeee";
--static const char col_cyan[] = "#750000";
-+static const char col_cyan[] = "#ffffff";
- static const char *colors[][3] = {
- /* fg bg border */
- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
-- [SchemeSel] = { col_gray4, col_cyan, col_cyan },
-+ [SchemeSel] = { col_gray1, col_cyan, col_cyan },
- };
-
- typedef struct {
-@@ -32,17 +32,21 @@ typedef struct {
- } Sp;
- const char *spcmd1[] = { "st", "-g", "150x50", "-c", "sphtop", "-e", "htop", NULL };
- const char *spcmd2[] = { "st", "-g", "150x50", "-c", "spterm", NULL };
--const char *spcmd3[] = { "st", "-g", "150x50", "-c", "sppm", "-e", "pulsemixer", NULL };
--const char *spcmd4[] = { "st", "-g", "150x50", "-c", "spncmp", "-e", "ncmpcpp", NULL };
--const char *spcmd5[] = { "st", "-g", "150x50", "-c", "spmutt", "-e", "neomutt", NULL };
--const char *spcmd6[] = { "st", "-g", "150x50", "-c", "spping", "-e", "ping", "1.1.1.1", NULL };
-+const char *spcmd3[] = { "st", "-g", "150x50", "-c", "sppmxr", "-e", "pulsemixer", NULL };
-+const char *spcmd4[] = { "st", "-g", "150x50", "-c", "spxmrw", "-e", "xmrzachir", NULL };
-+const char *spcmd5[] = { "st", "-g", "150x50", "-c", "spncmp", "-e", "ncmpcpp", NULL };
-+const char *spcmd6[] = { "st", "-g", "150x50", "-c", "spmutt", "-e", "zsh", "-c", "neomutt", NULL };
-+const char *spcmd7[] = { "st", "-g", "150x50", "-c", "spxmpp", "-e", "profanity", NULL };
-+const char *spcmd8[] = { "st", "-g", "150x50", "-c", "spircc", "-e", "irssi", NULL };
- static Sp scratchpads[] = {
- { "sphtop", spcmd1 },
- { "spterm", spcmd2 },
-- { "sppm", spcmd3 },
-- { "spncmp", spcmd4 },
-- { "spmutt", spcmd5 },
-- { "spping", spcmd6 },
-+ { "sppmxr", spcmd3 },
-+ { "spxmrw", spcmd4 },
-+ { "spncmp", spcmd5 },
-+ { "spmutt", spcmd6 },
-+ { "spxmpp", spcmd7 },
-+ { "spircc", spcmd8 },
- };
-
- /* tagging */
-@@ -80,10 +84,12 @@ static const Rule rules[] = {
- { "lutris", NULL, NULL, 2, 0, 0, 0, -1 },
- { "sphtop", NULL, NULL, SPTAG(0), 1, 1, 1, -1 },
- { "spterm", NULL, NULL, SPTAG(1), 1, 1, 1, -1 },
-- { "sppm", NULL, NULL, SPTAG(2), 1, 1, 1, -1 },
-- { "spncmp", NULL, NULL, SPTAG(3), 1, 1, 1, -1 },
-- { "spmutt", NULL, NULL, SPTAG(4), 1, 1, 1, -1 },
-- { "spping", NULL, NULL, SPTAG(5), 1, 1, 1, -1 },
-+ { "sppmxr", NULL, NULL, SPTAG(2), 1, 1, 1, -1 },
-+ { "spxmrw", NULL, NULL, SPTAG(3), 1, 1, 1, -1 },
-+ { "spncmp", NULL, NULL, SPTAG(4), 1, 1, 1, -1 },
-+ { "spmutt", NULL, NULL, SPTAG(5), 1, 1, 1, -1 },
-+ { "spxmpp", NULL, NULL, SPTAG(6), 1, 1, 1, -1 },
-+ { "spircc", NULL, NULL, SPTAG(7), 1, 1, 1, -1 },
- { NULL, "monero-wallet-gui",NULL, 256, 1, 0, 0, -1 },
- };
-
-@@ -103,7 +109,7 @@ static const Layout layouts[] = {
- };
-
- /* key definitions */
--#define MODKEY Mod3Mask
-+#define MODKEY Mod1Mask
- #define TAGKEYS(KEY,TAG) \
- { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
- { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
-@@ -118,7 +124,7 @@ 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 *rmenucmd[] = { "/usr/sbin/j4-dmenu-desktop", NULL }; */
- /* static const char *passmenu[] = { "passmenu", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; */
--static const char *termcmd[] = { "urxvtc", NULL };
-+static const char *termcmd[] = { "st", NULL };
- /* static const char *termcmd[] = { "alacritty", NULL }; */
- static const char *sxhkdsig[] = { "pkill", "-USR1", "sxhkd", NULL };
- /* static const char *mpdtoggle[] = { "playerctl", "--player=mpd,mpv,%any", "play-pause", NULL }; */
-@@ -148,28 +154,32 @@ static Key keys[] = {
- { MODKEY|ControlMask, XK_z, togglescratch, {.ui = 0 } },
- { MODKEY|ControlMask, XK_x, togglescratch, {.ui = 1 } },
- { MODKEY|ControlMask, XK_c, togglescratch, {.ui = 2 } },
-- { MODKEY|ControlMask, XK_b, togglescratch, {.ui = 3 } },
-- { MODKEY|ControlMask, XK_a, togglescratch, {.ui = 4 } },
-- { MODKEY|ControlMask, XK_s, togglescratch, {.ui = 5 } },
-- { MODKEY, XK_Escape, spawn, {.v = sxhkdsig } },
-- // { 0, XF86XK_AudioPlay, spawn, {.v = mpdtoggle } },
-- // { 0, XF86XK_AudioNext, spawn, {.v = mpdnext } },
-- // { 0, XF86XK_AudioPrev, spawn, {.v = mpdprev } },
-- // { ShiftMask, XF86XK_AudioPlay, spawn, {.v = plytoggle } },
-- // { ShiftMask, XF86XK_AudioNext, spawn, {.v = plyfwd } },
-- // { ShiftMask, XF86XK_AudioPrev, spawn, {.v = plybck } },
-- // { 0, XF86XK_MonBrightnessUp, spawn, {.v = blightup } },
-- // { 0, XF86XK_MonBrightnessDown, spawn, {.v = blightdown } },
-- // { 0, XF86XK_AudioLowerVolume, spawn, {.v = audiodown } },
-- // { 0, XF86XK_AudioRaiseVolume, spawn, {.v = audioup } },
-- // { 0, XF86XK_AudioMute, spawn, {.v = audiomute } },
-- // { 0, XF86XK_AudioMicMute, spawn, {.v = micmute } },
-- // { Mod4Mask, XK_l, spawn, {.v = lockscr } },
-+ { MODKEY|ControlMask, XK_v, togglescratch, {.ui = 3 } },
-+ { MODKEY|ControlMask, XK_b, togglescratch, {.ui = 4 } },
-+ { MODKEY|ControlMask, XK_a, togglescratch, {.ui = 5 } },
-+ { MODKEY|ControlMask, XK_s, togglescratch, {.ui = 6 } },
-+ { MODKEY|ControlMask, XK_d, togglescratch, {.ui = 7 } },
-+ { MODKEY, XK_Escape, spawn, {.v = sxhkdsig } },
-+ // { 0, XF86XK_AudioPlay, spawn, {.v = mpdtoggle } },
-+ // { 0, XF86XK_AudioNext, spawn, {.v = mpdnext } },
-+ // { 0, XF86XK_AudioPrev, spawn, {.v = mpdprev } },
-+ // { ShiftMask, XF86XK_AudioPlay, spawn, {.v = plytoggle } },
-+ // { ShiftMask, XF86XK_AudioNext, spawn, {.v = plyfwd } },
-+ // { ShiftMask, XF86XK_AudioPrev, spawn, {.v = plybck } },
-+ // { 0, XF86XK_MonBrightnessUp, spawn, {.v = blightup } },
-+ // { 0, XF86XK_MonBrightnessDown, spawn, {.v = blightdown } },
-+ // { 0, XF86XK_AudioLowerVolume, spawn, {.v = audiodown } },
-+ // { 0, XF86XK_AudioRaiseVolume, spawn, {.v = audioup } },
-+ // { 0, XF86XK_AudioMute, spawn, {.v = audiomute } },
-+ // { 0, XF86XK_AudioMicMute, spawn, {.v = micmute } },
-+ // { Mod4Mask, XK_l, spawn, {.v = lockscr } },
- { MODKEY, XK_b, togglebar, {0} },
- { MODKEY, XK_j, focusstack, {.i = +1 } },
- { MODKEY, XK_k, focusstack, {.i = -1 } },
- { MODKEY|ShiftMask, XK_j, pushdown, {.i = +1 } },
- { MODKEY|ShiftMask, XK_k, pushup, {.i = -1 } },
-+ { MODKEY|Mod4Mask, XK_j, pushmdown, {.i = +1 } },
-+ { MODKEY|Mod4Mask, XK_k, pushmup, {.i = -1 } },
- { MODKEY|ControlMask, XK_k, setcfact, {.f = +0.25} },
- { MODKEY|ControlMask, XK_j, setcfact, {.f = -0.25} },
- { MODKEY|ControlMask, XK_o, setcfact, {.f = 0.00} },
-diff --git a/dwm.c b/dwm.c
-index 603497c..aa637c0 100644
---- a/dwm.c
-+++ b/dwm.c
-@@ -1662,6 +1662,50 @@ pushup(const Arg *arg) {
- arrange(selmon);
- }
-
-+void
-+pushmdown(const Arg *arg) {
-+ Client *sel = selmon->sel, *c;
-+
-+ if(!sel || sel->isfloating || sel == nexttiled(selmon->clients))
-+ return;
-+ if((c = nexttiled(sel->next))) {
-+ detach(sel);
-+ sel->next = c->next;
-+ c->next = sel;
-+ } else {
-+ detach(sel);
-+ attach(sel);
-+ }
-+ focus(sel);
-+ arrange(selmon);
-+}
-+
-+void
-+pushmup(const Arg *arg) {
-+ Client *sel = selmon->sel, *c;
-+
-+ if(!sel || sel->isfloating)
-+ return;
-+ if((c = prevtiled(sel))) {
-+ detach(sel);
-+ sel->next = c;
-+ if(selmon->clients == c)
-+ selmon->clients = sel;
-+ else {
-+ for(c = selmon->clients; c->next != sel->next; c = c->next);
-+ c->next = sel;
-+ }
-+ } else {
-+ for(c = sel; c->next; c = c->next);
-+ detach(sel);
-+ sel->next = NULL;
-+ c->next = sel;
-+ }
-+ focus(sel);
-+ arrange(selmon);
-+}
-+
-+
- void
- quit(const Arg *arg)
- {