summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorProsperousPotato <ProsperousPotato@users.noreply.github.com>2026-01-17 14:20:58 +0000
committerProsperousPotato <ProsperousPotato@users.noreply.github.com>2026-01-17 14:20:58 +0000
commit6ed368f712ef42c823e855cdaa1d3fb56738193d (patch)
tree61c16cafbcbeaa9b1ea510b3ef51718bdacb9ae5
parent970a379007237c43a772cf3eab68e9f5ce7c10ff (diff)
suppress compiler warning, other stuff
-rw-r--r--config.h10
-rw-r--r--dwm.c14
2 files changed, 14 insertions, 10 deletions
diff --git a/config.h b/config.h
index d4bc132..401c95d 100644
--- a/config.h
+++ b/config.h
@@ -93,15 +93,15 @@ static const Key keys[] = {
{ MODKEY, XK_l, setmfact, {.f = +0.02} },
{ MODKEY|ShiftMask, XK_h, setcfact, {.f = +0.10} },
{ MODKEY|ShiftMask, XK_l, setcfact, {.f = -0.10} },
- { MODKEY, XK_b, setcfact, {.f = 0.00} },
+ { MODKEY, XK_o, setcfact, {.f = 0.00} },
{ MODKEYTWO, XK_Tab, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_q, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
- { MODKEY|ShiftMask, XK_Return, togglefullscr, {0} },
- { MODKEY, XK_Return, togglefloating, {0} },
+ { MODKEYTWO|ShiftMask, XK_Return, togglefullscr, {0} },
+ { MODKEYTWO, XK_Return, togglefloating, {0} },
{ MODKEY, XK_grave, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_grave, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
@@ -127,7 +127,7 @@ static const Key keys[] = {
{ MODKEY|ShiftMask, XK_a, spawn, SHCMD("scrcpy") },
#ifdef __linux__
- { MODKEY, XK_g, spawn, SHCMD(TERMINAL" -c stfloat -e watch -c -n 2 genlop -c") },
+ { MODKEY, XK_g, spawn, SHCMD(TERMINAL" -c stfloat -g 60x10 -e watch -c -n 2 genlop -c") },
{ MODKEY, XK_s, spawn, SHCMD("steam -dev") },
{ MODKEY|ShiftMask, XK_s, spawn, SHCMD("pkill steam") },
@@ -150,7 +150,7 @@ static const Key keys[] = {
{ MODKEY|ShiftMask, XK_p, search, {.i = 1} },
{ MODKEY|ShiftMask, XK_q, search, {.i = 2} },
- { MODKEY, XK_o, togglemouse, {0} },
+ { MODKEY, XK_b, togglemouse, {0} },
// move (rightmost 'wasd' like cluster of keys in ISO layout)
{ MODKEY, XK_apostrophe, moveresize, {.v = "0x 15y 0w 0h" } },
diff --git a/dwm.c b/dwm.c
index 758d052..9b41b8d 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1258,6 +1258,9 @@ moveresize(const Arg *arg) {
if (sscanf((char *)arg->v, "%d%c %d%c %d%c %d%c", &x, &xAbs, &y, &yAbs, &w, &wAbs, &h, &hAbs) != 8)
return;
+ if (!ml)
+ XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2);
+
nw = c->w + w;
if (wAbs == 'W')
nw = w < selmon->mw - 2 * c->bw ? w : selmon->mw - 2 * c->bw;
@@ -1296,8 +1299,7 @@ moveresize(const Arg *arg) {
resize(c, nx, ny, nw, nh, True);
if (!ml) {
- if (xqp && ox <= msx && (ox + ow) >= msx && oy <= msy && (oy + oh) >= msy)
- {
+ if (xqp && ox <= msx && (ox + ow) >= msx && oy <= msy && (oy + oh) >= msy) {
nmx = c->x - ox + c->w - ow;
nmy = c->y - oy + c->h - oh;
if ((msx + nmx) > c->x && (msy + nmy) > c->y)
@@ -1600,7 +1602,7 @@ restack(Monitor *m)
for (c = m->stack; c; c = c->snext)
if (!c->isfloating && ISVISIBLE(c)) {
XConfigureWindow(dpy, c->win, CWSibling|CWStackMode, &wc);
- // wc.sibling = c->win;
+ wc.sibling = c->win;
}
}
XSync(dpy, False);
@@ -2082,8 +2084,7 @@ swapfocus()
XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2);
return;
}
- Arg arg = {.i = +1};
- focusstack(&arg);
+ focusstack(&(Arg){.i = +1});
XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2);
}
@@ -2606,7 +2607,10 @@ getparentprocess(pid_t p)
if (!(f = fopen(buf, "r")))
return 0;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-result"
fscanf(f, "%*u %*s %*c %u", &v);
+#pragma GCC diagnostic pop
fclose(f);
#endif /* __linux__*/