summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2021-09-27 15:08:56 -0500
committerzachir <zachir@librem.one>2021-09-27 15:08:56 -0500
commitbbdce6d54cc20f31a1157b6152818ab0a56ae625 (patch)
tree756d7ab07f064d74cf0c3fcbd489575b3728a1bf
parent60fc9232553a31061c28cf932efb5b4e0c10d80c (diff)
fix pushmdown
-rw-r--r--dwm.c2
-rw-r--r--patch.diff146
2 files changed, 3 insertions, 145 deletions
diff --git a/dwm.c b/dwm.c
index 49b0aa3..7882132 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1668,7 +1668,7 @@ void
pushmdown(const Arg *arg) {
Client *sel = selmon->sel, *c;
- if(!sel || sel->isfloating || sel == nexttiled(selmon->clients))
+ if(!sel || sel->isfloating)
return;
if((c = nexttiled(sel->next))) {
detach(sel);
diff --git a/patch.diff b/patch.diff
index 9a54a7b..1583605 100644
--- a/patch.diff
+++ b/patch.diff
@@ -286,7 +286,7 @@ index 13b3729..bf742fd 100644
.BR dmenu (1),
.BR st (1)
diff --git a/dwm.c b/dwm.c
-index 4465af1..49b0aa3 100644
+index 4465af1..7882132 100644
--- a/dwm.c
+++ b/dwm.c
@@ -40,6 +40,8 @@
@@ -1142,7 +1142,7 @@ index 4465af1..49b0aa3 100644
+pushmdown(const Arg *arg) {
+ Client *sel = selmon->sel, *c;
+
-+ if(!sel || sel->isfloating || sel == nexttiled(selmon->clients))
++ if(!sel || sel->isfloating)
+ return;
+ if((c = nexttiled(sel->next))) {
+ detach(sel);
@@ -2019,145 +2019,3 @@ index 4465af1..49b0aa3 100644
cleanup();
XCloseDisplay(dpy);
return EXIT_SUCCESS;
-diff --git a/dwm.desktop b/dwm.desktop
-new file mode 100644
-index 0000000..5a6021f
---- /dev/null
-+++ b/dwm.desktop
-@@ -0,0 +1,10 @@
-+[Desktop Entry]
-+Version=6.3
-+Type=Application
-+Name=dwm
-+Comment=Suckless' dynamic window manager
-+Exec=dwm
-+Icon=dwm
-+Terminal=false
-+StartupNotify=false
-+Categories=Application;
-diff --git a/dwmc b/dwmc
-new file mode 100755
-index 0000000..ac2d0e6
---- /dev/null
-+++ b/dwmc
-@@ -0,0 +1,40 @@
-+#!/usr/bin/env sh
-+
-+signal() {
-+ xsetroot -name "fsignal:$*"
-+}
-+
-+case $# in
-+1)
-+ case $1 in
-+ setlayout | view | viewall | togglebar | togglefloating | zoom | killclient)
-+ signal $1
-+ ;;
-+ *)
-+ echo "Unknown command or missing one argument."
-+ exit 1
-+ ;;
-+ esac
-+ ;;
-+2)
-+ case $1 in
-+ view | togglescratch)
-+ signal $1 ui $2
-+ ;;
-+ viewex | toggleviewex | tagex | toggletagex | setlayoutex | focusstack | incnmaster | focusmon | tagmon | quit)
-+ signal $1 i $2
-+ ;;
-+ setmfact)
-+ signal $1 f $2
-+ ;;
-+ *)
-+ echo "Unknown command or one too many arguments."
-+ exit 1
-+ ;;
-+ esac
-+ ;;
-+*)
-+ echo "Too many arguments."
-+ exit 1
-+ ;;
-+esac
-diff --git a/tcl.c b/tcl.c
-new file mode 100644
-index 0000000..4c94914
---- /dev/null
-+++ b/tcl.c
-@@ -0,0 +1,74 @@
-+void
-+tcl(Monitor * m)
-+{
-+ int x, y, h, w, mw, sw, bdw;
-+ unsigned int i, n;
-+ Client * c;
-+
-+ for (n = 0, c = nexttiled(m->clients); c;
-+ c = nexttiled(c->next), n++);
-+
-+ if (n == 0)
-+ return;
-+
-+ c = nexttiled(m->clients);
-+
-+ mw = m->mfact * m->ww;
-+ sw = (m->ww - mw) / 2;
-+ bdw = (2 * c->bw);
-+ resize(c,
-+ n < 3 ? m->wx : m->wx + sw,
-+ m->wy,
-+ n == 1 ? m->ww - bdw : mw - bdw,
-+ m->wh - bdw,
-+ False);
-+
-+ if (--n == 0)
-+ return;
-+
-+ w = (m->ww - mw) / ((n > 1) + 1);
-+ c = nexttiled(c->next);
-+
-+ if (n > 1)
-+ {
-+ x = m->wx + ((n > 1) ? mw + sw : mw);
-+ y = m->wy;
-+ h = m->wh / (n / 2);
-+
-+ if (h < bh)
-+ h = m->wh;
-+
-+ for (i = 0; c && i < n / 2; c = nexttiled(c->next), i++)
-+ {
-+ resize(c,
-+ x,
-+ y,
-+ w - bdw,
-+ (i + 1 == n / 2) ? m->wy + m->wh - y - bdw : h - bdw,
-+ False);
-+
-+ if (h != m->wh)
-+ y = c->y + HEIGHT(c);
-+ }
-+ }
-+
-+ x = (n + 1 / 2) == 1 ? mw : m->wx;
-+ y = m->wy;
-+ h = m->wh / ((n + 1) / 2);
-+
-+ if (h < bh)
-+ h = m->wh;
-+
-+ for (i = 0; c; c = nexttiled(c->next), i++)
-+ {
-+ resize(c,
-+ x,
-+ y,
-+ (i + 1 == (n + 1) / 2) ? w - bdw : w - bdw,
-+ (i + 1 == (n + 1) / 2) ? m->wy + m->wh - y - bdw : h - bdw,
-+ False);
-+
-+ if (h != m->wh)
-+ y = c->y + HEIGHT(c);
-+ }
-+}