diff options
Diffstat (limited to 'oldresources/dwm/patches')
4 files changed, 0 insertions, 507 deletions
diff --git a/oldresources/dwm/patches/dwm-actualfullscreen-20211013-cb3f58a.diff b/oldresources/dwm/patches/dwm-actualfullscreen-20211013-cb3f58a.diff deleted file mode 100644 index d3be230..0000000 --- a/oldresources/dwm/patches/dwm-actualfullscreen-20211013-cb3f58a.diff +++ /dev/null @@ -1,68 +0,0 @@ -From eea13010ffc3983392857ee1e3804e3aa1064d7a Mon Sep 17 00:00:00 2001 -From: Soenke Lambert <s.lambert@mittwald.de> -Date: Wed, 13 Oct 2021 18:21:09 +0200 -Subject: [PATCH] Fullscreen current window with [Alt]+[Shift]+[f] - -This actually fullscreens a window, instead of just hiding the statusbar -and applying the monocle layout. ---- - config.def.h | 1 + - dwm.1 | 3 +++ - dwm.c | 8 ++++++++ - 3 files changed, 12 insertions(+) - -diff --git a/config.def.h b/config.def.h -index 1c0b587..8cd3204 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -78,6 +78,7 @@ static Key keys[] = { - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, - { MODKEY, XK_space, setlayout, {0} }, - { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, -+ { MODKEY|ShiftMask, XK_f, togglefullscr, {0} }, - { MODKEY, XK_0, view, {.ui = ~0 } }, - { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, - { MODKEY, XK_comma, focusmon, {.i = -1 } }, -diff --git a/dwm.1 b/dwm.1 -index 13b3729..a368d05 100644 ---- a/dwm.1 -+++ b/dwm.1 -@@ -116,6 +116,9 @@ Zooms/cycles focused window to/from master area (tiled layouts only). - .B Mod1\-Shift\-c - Close focused window. - .TP -+.B Mod1\-Shift\-f -+Toggle fullscreen for focused window. -+.TP - .B Mod1\-Shift\-space - Toggle focused window between tiled and floating state. - .TP -diff --git a/dwm.c b/dwm.c -index 4465af1..c1b899a 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -211,6 +211,7 @@ static void tagmon(const Arg *arg); - static void tile(Monitor *); - static void togglebar(const Arg *arg); - static void togglefloating(const Arg *arg); -+static void togglefullscr(const Arg *arg); - static void toggletag(const Arg *arg); - static void toggleview(const Arg *arg); - static void unfocus(Client *c, int setfocus); -@@ -1719,6 +1720,13 @@ togglefloating(const Arg *arg) - arrange(selmon); - } - -+void -+togglefullscr(const Arg *arg) -+{ -+ if(selmon->sel) -+ setfullscreen(selmon->sel, !selmon->sel->isfullscreen); -+} -+ - void - toggletag(const Arg *arg) - { --- -2.30.2 - diff --git a/oldresources/dwm/patches/dwm-fullgaps-6.4.diff b/oldresources/dwm/patches/dwm-fullgaps-6.4.diff deleted file mode 100644 index dc52139..0000000 --- a/oldresources/dwm/patches/dwm-fullgaps-6.4.diff +++ /dev/null @@ -1,94 +0,0 @@ -diff -up a/config.def.h b/config.def.h ---- a/config.def.h -+++ b/config.def.h -@@ -2,6 +2,7 @@ - - /* appearance */ - static const unsigned int borderpx = 1; /* border pixel of windows */ -+static const unsigned int gappx = 5; /* gaps between windows */ - static const unsigned int snap = 32; /* snap pixel */ - static const int showbar = 1; /* 0 means no bar */ - static const int topbar = 1; /* 0 means bottom bar */ -@@ -85,6 +86,9 @@ static const Key keys[] = { - { MODKEY, XK_period, focusmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, - { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, -+ { MODKEY, XK_minus, setgaps, {.i = -1 } }, -+ { MODKEY, XK_equal, setgaps, {.i = +1 } }, -+ { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } }, - TAGKEYS( XK_1, 0) - TAGKEYS( XK_2, 1) - TAGKEYS( XK_3, 2) -diff -up a/dwm.c b/dwm.c ---- a/dwm.c 2023-04-30 -+++ b/dwm.c 2023-04-30 -@@ -119,6 +119,7 @@ struct Monitor { - int by; /* bar geometry */ - int mx, my, mw, mh; /* screen size */ - int wx, wy, ww, wh; /* window area */ -+ int gappx; /* gaps between windows */ - unsigned int seltags; - unsigned int sellt; - unsigned int tagset[2]; -@@ -200,6 +201,7 @@ static void sendmon(Client *c, Monitor * - static void setclientstate(Client *c, long state); - static void setfocus(Client *c); - static void setfullscreen(Client *c, int fullscreen); -+static void setgaps(const Arg *arg); - static void setlayout(const Arg *arg); - static void setmfact(const Arg *arg); - static void setup(void); -@@ -641,6 +643,7 @@ createmon(void) - m->nmaster = nmaster; - m->showbar = showbar; - m->topbar = topbar; -+ m->gappx = gappx; - m->lt[0] = &layouts[0]; - m->lt[1] = &layouts[1 % LENGTH(layouts)]; - strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); -@@ -1508,6 +1511,16 @@ setfullscreen(Client *c, int fullscreen) - } - - void -+setgaps(const Arg *arg) -+{ -+ if ((arg->i == 0) || (selmon->gappx + arg->i < 0)) -+ selmon->gappx = 0; -+ else -+ selmon->gappx += arg->i; -+ arrange(selmon); -+} -+ -+void - setlayout(const Arg *arg) - { - if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) -@@ -1697,18 +1710,18 @@ tile(Monitor *m) - if (n > m->nmaster) - mw = m->nmaster ? m->ww * m->mfact : 0; - else -- mw = m->ww; -- for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) -- if (i < m->nmaster) { -- h = (m->wh - my) / (MIN(n, m->nmaster) - i); -- resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0); -- if (my + HEIGHT(c) < m->wh) -- my += HEIGHT(c); -+ mw = m->ww - m->gappx; -+ for (i = 0, my = ty = m->gappx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) -+ if (i < m->nmaster) { -+ h = (m->wh - my) / (MIN(n, m->nmaster) - i) - m->gappx; -+ resize(c, m->wx + m->gappx, m->wy + my, mw - (2*c->bw) - m->gappx, h - (2*c->bw), 0); -+ if (my + HEIGHT(c) + m->gappx < m->wh) -+ my += HEIGHT(c) + m->gappx; - } else { -- h = (m->wh - ty) / (n - i); -- resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0); -- if (ty + HEIGHT(c) < m->wh) -- ty += HEIGHT(c); -+ h = (m->wh - ty) / (n - i) - m->gappx; -+ resize(c, m->wx + mw + m->gappx, m->wy + ty, m->ww - mw - (2*c->bw) - 2*m->gappx, h - (2*c->bw), 0); -+ if (ty + HEIGHT(c) + m->gappx < m->wh) -+ ty += HEIGHT(c) + m->gappx; - } - } diff --git a/oldresources/dwm/patches/dwm-scratchpad-20240321-061e9fe.diff b/oldresources/dwm/patches/dwm-scratchpad-20240321-061e9fe.diff deleted file mode 100644 index cb218b6..0000000 --- a/oldresources/dwm/patches/dwm-scratchpad-20240321-061e9fe.diff +++ /dev/null @@ -1,105 +0,0 @@ -From b9f3c11c3150f0b5d5b297a4eeeb2012764c98f5 Mon Sep 17 00:00:00 2001 -From: visil <workregor@mail.ru> -Date: Thu, 21 Mar 2024 15:16:39 +0300 -Subject: [PATCH] Patch updated to 6.5 - ---- - config.def.h | 3 +++ - dwm.c | 34 ++++++++++++++++++++++++++++++++++ - 2 files changed, 37 insertions(+) - -diff --git a/config.def.h b/config.def.h -index 9efa774..0b8b310 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -59,11 +59,14 @@ static const Layout layouts[] = { - 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 scratchpadname[] = "scratchpad"; -+static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL }; - - static const Key keys[] = { - /* modifier key function argument */ - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, - { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, -+ { MODKEY, XK_grave, togglescratch, {.v = scratchpadcmd } }, - { MODKEY, XK_b, togglebar, {0} }, - { MODKEY, XK_j, focusstack, {.i = +1 } }, - { MODKEY, XK_k, focusstack, {.i = -1 } }, -diff --git a/dwm.c b/dwm.c -index f1d86b2..a8db21a 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -211,6 +211,7 @@ static void tagmon(const Arg *arg); - static void tile(Monitor *m); - static void togglebar(const Arg *arg); - static void togglefloating(const Arg *arg); -+static void togglescratch(const Arg *arg); - static void toggletag(const Arg *arg); - static void toggleview(const Arg *arg); - static void unfocus(Client *c, int setfocus); -@@ -271,6 +272,8 @@ 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]; }; - -@@ -1061,6 +1064,14 @@ manage(Window w, XWindowAttributes *wa) - c->y = MAX(c->y, c->mon->wy); - c->bw = 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); -@@ -1651,6 +1662,7 @@ spawn(const Arg *arg) - - if (arg->v == dmenucmd) - dmenumon[0] = '0' + selmon->num; -+ selmon->tagset[selmon->seltags] &= ~scratchtag; - if (fork() == 0) { - if (dpy) - close(ConnectionNumber(dpy)); -@@ -1735,6 +1747,28 @@ togglefloating(const Arg *arg) - arrange(selmon); - } - -+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) - { --- -2.44.0 - diff --git a/oldresources/dwm/patches/dwm-xresources-20210827-138b405.diff b/oldresources/dwm/patches/dwm-xresources-20210827-138b405.diff deleted file mode 100644 index 29852a9..0000000 --- a/oldresources/dwm/patches/dwm-xresources-20210827-138b405.diff +++ /dev/null @@ -1,240 +0,0 @@ -From f30583c6e2ab5e7de6ef4ebf156076ac0f6e69fc Mon Sep 17 00:00:00 2001 -From: Jack Bird <jack.bird@durham.ac.uk> -Date: Fri, 27 Aug 2021 00:53:14 +0100 -Subject: [PATCH] xresources updated for 138b405 - ---- - config.def.h | 61 ++++++++++++++++++++++++++++++-------------- - drw.c | 2 +- - drw.h | 2 +- - dwm.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 116 insertions(+), 21 deletions(-) - -diff --git a/config.def.h b/config.def.h -index a2ac963..87ac198 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -1,21 +1,23 @@ - /* See LICENSE file for copyright and license details. */ - - /* appearance */ --static const unsigned int borderpx = 1; /* border pixel of windows */ --static const unsigned int snap = 32; /* snap pixel */ --static const int showbar = 1; /* 0 means no bar */ --static const int topbar = 1; /* 0 means bottom bar */ --static const char *fonts[] = { "monospace:size=10" }; --static const char dmenufont[] = "monospace: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[] = "#005577"; --static const char *colors[][3] = { -- /* fg bg border */ -- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, -- [SchemeSel] = { col_gray4, col_cyan, col_cyan }, -+static unsigned int borderpx = 1; /* border pixel of windows */ -+static unsigned int snap = 32; /* snap pixel */ -+static int showbar = 1; /* 0 means no bar */ -+static int topbar = 1; /* 0 means bottom bar */ -+static char font[] = "monospace:size=10"; -+static char dmenufont[] = "monospace:size=10"; -+static const char *fonts[] = { font }; -+static char normbgcolor[] = "#222222"; -+static char normbordercolor[] = "#444444"; -+static char normfgcolor[] = "#bbbbbb"; -+static char selfgcolor[] = "#eeeeee"; -+static char selbordercolor[] = "#005577"; -+static char selbgcolor[] = "#005577"; -+static char *colors[][3] = { -+ /* fg bg border */ -+ [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor }, -+ [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor }, - }; - - /* tagging */ -@@ -32,9 +34,9 @@ static const Rule rules[] = { - }; - - /* layout(s) */ --static const float mfact = 0.55; /* 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 float mfact = 0.55; /* factor of master area size [0.05..0.95] */ -+static int nmaster = 1; /* number of clients in master area */ -+static int resizehints = 1; /* 1 means respect size hints in tiled resizals */ - static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ - - static const Layout layouts[] = { -@@ -57,9 +59,30 @@ static const Layout layouts[] = { - - /* 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 *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL }; - static const char *termcmd[] = { "st", NULL }; - -+/* -+ * Xresources preferences to load at startup -+ */ -+ResourcePref resources[] = { -+ { "font", STRING, &font }, -+ { "dmenufont", STRING, &dmenufont }, -+ { "normbgcolor", STRING, &normbgcolor }, -+ { "normbordercolor", STRING, &normbordercolor }, -+ { "normfgcolor", STRING, &normfgcolor }, -+ { "selbgcolor", STRING, &selbgcolor }, -+ { "selbordercolor", STRING, &selbordercolor }, -+ { "selfgcolor", STRING, &selfgcolor }, -+ { "borderpx", INTEGER, &borderpx }, -+ { "snap", INTEGER, &snap }, -+ { "showbar", INTEGER, &showbar }, -+ { "topbar", INTEGER, &topbar }, -+ { "nmaster", INTEGER, &nmaster }, -+ { "resizehints", INTEGER, &resizehints }, -+ { "mfact", FLOAT, &mfact }, -+}; -+ - static Key keys[] = { - /* modifier key function argument */ - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, -diff --git a/drw.c b/drw.c -index 4cdbcbe..8f1059e 100644 ---- a/drw.c -+++ b/drw.c -@@ -208,7 +208,7 @@ drw_clr_create(Drw *drw, Clr *dest, const char *clrname) - /* Wrapper to create color schemes. The caller has to call free(3) on the - * returned color scheme when done using it. */ - Clr * --drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount) -+drw_scm_create(Drw *drw, char *clrnames[], size_t clrcount) - { - size_t i; - Clr *ret; -diff --git a/drw.h b/drw.h -index 4bcd5ad..42b04ce 100644 ---- a/drw.h -+++ b/drw.h -@@ -39,7 +39,7 @@ void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned in - - /* Colorscheme abstraction */ - void drw_clr_create(Drw *drw, Clr *dest, const char *clrname); --Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount); -+Clr *drw_scm_create(Drw *drw, char *clrnames[], size_t clrcount); - - /* Cursor abstraction */ - Cur *drw_cur_create(Drw *drw, int shape); -diff --git a/dwm.c b/dwm.c -index 5e4d494..2214b19 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -36,6 +36,7 @@ - #include <X11/Xlib.h> - #include <X11/Xproto.h> - #include <X11/Xutil.h> -+#include <X11/Xresource.h> - #ifdef XINERAMA - #include <X11/extensions/Xinerama.h> - #endif /* XINERAMA */ -@@ -141,6 +142,19 @@ typedef struct { - int monitor; - } Rule; - -+/* Xresources preferences */ -+enum resource_type { -+ STRING = 0, -+ INTEGER = 1, -+ FLOAT = 2 -+}; -+ -+typedef struct { -+ char *name; -+ enum resource_type type; -+ void *dst; -+} ResourcePref; -+ - /* function declarations */ - static void applyrules(Client *c); - static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact); -@@ -234,6 +248,8 @@ static int xerror(Display *dpy, XErrorEvent *ee); - static int xerrordummy(Display *dpy, XErrorEvent *ee); - static int xerrorstart(Display *dpy, XErrorEvent *ee); - static void zoom(const Arg *arg); -+static void load_xresources(void); -+static void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst); - - /* variables */ - static const char broken[] = "broken"; -@@ -2127,6 +2143,60 @@ zoom(const Arg *arg) - pop(c); - } - -+void -+resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst) -+{ -+ char *sdst = NULL; -+ int *idst = NULL; -+ float *fdst = NULL; -+ -+ sdst = dst; -+ idst = dst; -+ fdst = dst; -+ -+ char fullname[256]; -+ char *type; -+ XrmValue ret; -+ -+ snprintf(fullname, sizeof(fullname), "%s.%s", "dwm", name); -+ fullname[sizeof(fullname) - 1] = '\0'; -+ -+ XrmGetResource(db, fullname, "*", &type, &ret); -+ if (!(ret.addr == NULL || strncmp("String", type, 64))) -+ { -+ switch (rtype) { -+ case STRING: -+ strcpy(sdst, ret.addr); -+ break; -+ case INTEGER: -+ *idst = strtoul(ret.addr, NULL, 10); -+ break; -+ case FLOAT: -+ *fdst = strtof(ret.addr, NULL); -+ break; -+ } -+ } -+} -+ -+void -+load_xresources(void) -+{ -+ Display *display; -+ char *resm; -+ XrmDatabase db; -+ ResourcePref *p; -+ -+ display = XOpenDisplay(NULL); -+ resm = XResourceManagerString(display); -+ if (!resm) -+ return; -+ -+ db = XrmGetStringDatabase(resm); -+ for (p = resources; p < resources + LENGTH(resources); p++) -+ resource_load(db, p->name, p->type, p->dst); -+ XCloseDisplay(display); -+} -+ - int - main(int argc, char *argv[]) - { -@@ -2139,6 +2209,8 @@ main(int argc, char *argv[]) - if (!(dpy = XOpenDisplay(NULL))) - die("dwm: cannot open display"); - checkotherwm(); -+ XrmInitialize(); -+ load_xresources(); - setup(); - #ifdef __OpenBSD__ - if (pledge("stdio rpath proc exec", NULL) == -1) --- -2.33.0 - |
