mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-24 17:23:09 +01:00
dwm: Add patch to fix monocle background transparency
Source: https://old.reddit.com/r/suckless/comments/jiyl4h/hiding_background_windows_in_monocle_and_deck/ga9fmc3/
This commit is contained in:
parent
be44fa4f99
commit
ad0f0619fd
31
assets/dwm-fix-monocle-transparency-background.patch
Normal file
31
assets/dwm-fix-monocle-transparency-background.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
diff --git a/dwm.c b/dwm.c
|
||||||
|
index 67c6b2b..59666f7 100644
|
||||||
|
--- a/dwm.c
|
||||||
|
+++ b/dwm.c
|
||||||
|
@@ -808,6 +808,8 @@ focus(Client *c)
|
||||||
|
XDeleteProperty(dpy, root, netatom[NetActiveWindow]);
|
||||||
|
}
|
||||||
|
selmon->sel = c;
|
||||||
|
+ if (selmon->lt[selmon->sellt]->arrange == monocle)
|
||||||
|
+ arrangemon(selmon);
|
||||||
|
drawbars();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1121,8 +1123,15 @@ monocle(Monitor *m)
|
||||||
|
n++;
|
||||||
|
if (n > 0) /* override layout symbol */
|
||||||
|
snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
|
||||||
|
- for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
|
||||||
|
- resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
|
||||||
|
+ for (c = m->stack; c && (!ISVISIBLE(c) || c->isfloating); c = c->snext);
|
||||||
|
+ if (c && !c->isfloating) {
|
||||||
|
+ XMoveWindow(dpy, c->win, m->wx, m->wy);
|
||||||
|
+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
|
||||||
|
+ c = c->snext;
|
||||||
|
+ }
|
||||||
|
+ for (; c; c = c->snext)
|
||||||
|
+ if (!c->isfloating && ISVISIBLE(c))
|
||||||
|
+ XMoveWindow(dpy, c->win, WIDTH(c) * -2, c->y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
@ -113,6 +113,8 @@ in
|
|||||||
|
|
||||||
package = pkgs.dwm.overrideAttrs (oldAttrs: {
|
package = pkgs.dwm.overrideAttrs (oldAttrs: {
|
||||||
patches = oldAttrs.patches ++ [
|
patches = oldAttrs.patches ++ [
|
||||||
|
../assets/dwm-fix-monocle-transparency-background.patch
|
||||||
|
|
||||||
(pkgs.fetchpatch {
|
(pkgs.fetchpatch {
|
||||||
url = "https://dwm.suckless.org/patches/hide_vacant_tags/dwm-hide_vacant_tags-6.4.diff";
|
url = "https://dwm.suckless.org/patches/hide_vacant_tags/dwm-hide_vacant_tags-6.4.diff";
|
||||||
hash = "sha256-GIbRW0Inwbp99rsKLfIDGvPwZ3pqihROMBp5vFlHx5Q=";
|
hash = "sha256-GIbRW0Inwbp99rsKLfIDGvPwZ3pqihROMBp5vFlHx5Q=";
|
||||||
|
Loading…
Reference in New Issue
Block a user