dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

Commit: 093013644afa4ddca5aa349c23b3450d2a882483
Parent: f423b4cb93c5db618355cfad10f2adccb562448c
Author: Randy Palamar
Date:   Mon, 27 May 2024 07:44:59 -0600

st: modify cwd patch to forward any args from original invocation

Diffstat:
M.config/sys/etc/portage/patches/x11-terms/st/0001-support-second-theme-and-runtime-swapping.patch | 8++++----
M.config/sys/etc/portage/patches/x11-terms/st/0002-support-setting-the-default-font-size-on-invocation.patch | 8++++----
M.config/sys/etc/portage/patches/x11-terms/st/0003-open-in-cwd.patch | 47+++++++++++++++++++++++++++++++++++------------
M.config/sys/etc/portage/patches/x11-terms/st/0004-split-borderpx-into-x-and-y-components.patch | 32++++++++++++++++----------------
4 files changed, 59 insertions(+), 36 deletions(-)

diff --git a/.config/sys/etc/portage/patches/x11-terms/st/0001-support-second-theme-and-runtime-swapping.patch b/.config/sys/etc/portage/patches/x11-terms/st/0001-support-second-theme-and-runtime-swapping.patch @@ -1,4 +1,4 @@ -From 32c7373697e60ff0449b6f30c071855e721e0f5e Mon Sep 17 00:00:00 2001 +From 22abac10b05beba3ec8126bc4765f18747cd63c7 Mon Sep 17 00:00:00 2001 From: Randy Palamar <palamar@ualberta.ca> Date: Tue, 24 Oct 2023 06:06:03 -0600 Subject: [PATCH] support second theme and runtime swapping @@ -8,7 +8,7 @@ Subject: [PATCH] support second theme and runtime swapping 1 file changed, 12 insertions(+) diff --git a/x.c b/x.c -index b36fb8c..bed68ef 100644 +index bd23686..9baca54 100644 --- a/x.c +++ b/x.c @@ -59,6 +59,7 @@ static void zoom(const Arg *); @@ -19,7 +19,7 @@ index b36fb8c..bed68ef 100644 /* config.h for applying patches and the configuration. */ #include "config.h" -@@ -1911,6 +1912,17 @@ resize(XEvent *e) +@@ -1917,6 +1918,17 @@ resize(XEvent *e) cresize(e->xconfigure.width, e->xconfigure.height); } @@ -38,5 +38,5 @@ index b36fb8c..bed68ef 100644 run(void) { -- -2.42.0 +2.44.0 diff --git a/.config/sys/etc/portage/patches/x11-terms/st/0002-support-setting-the-default-font-size-on-invocation.patch b/.config/sys/etc/portage/patches/x11-terms/st/0002-support-setting-the-default-font-size-on-invocation.patch @@ -1,4 +1,4 @@ -From 480c18ef43128e7801dc781fdab9513edc63414d Mon Sep 17 00:00:00 2001 +From ac563d3c42d01d5920771c68bf58a89bde33f0a0 Mon Sep 17 00:00:00 2001 From: Randy Palamar <palamar@ualberta.ca> Date: Thu, 25 Feb 2021 23:53:47 -0700 Subject: [PATCH] support setting the default font size on invocation @@ -42,7 +42,7 @@ index 39120b4..57ddfb8 100644 use a tty .I line diff --git a/x.c b/x.c -index bed68ef..58789c7 100644 +index 9baca54..2407c7e 100644 --- a/x.c +++ b/x.c @@ -4,6 +4,7 @@ @@ -62,7 +62,7 @@ index bed68ef..58789c7 100644 /* colors */ xw.cmap = XDefaultColormap(xw.dpy, xw.scr); -@@ -2086,6 +2087,11 @@ main(int argc, char *argv[]) +@@ -2092,6 +2093,11 @@ main(int argc, char *argv[]) case 'v': die("%s " VERSION "\n", argv0); break; @@ -75,5 +75,5 @@ index bed68ef..58789c7 100644 usage(); } ARGEND; -- -2.42.0 +2.44.0 diff --git a/.config/sys/etc/portage/patches/x11-terms/st/0003-open-in-cwd.patch b/.config/sys/etc/portage/patches/x11-terms/st/0003-open-in-cwd.patch @@ -1,16 +1,17 @@ -From e001e353ba52a0d05b472ca9681b76bdebb13822 Mon Sep 17 00:00:00 2001 +From ca8264b42f5d523f1e9bc9fec2f6060096a6c430 Mon Sep 17 00:00:00 2001 From: Randy Palamar <palamar@ualberta.ca> Date: Tue, 24 Oct 2023 06:02:54 -0600 Subject: [PATCH] open in cwd --- config.def.h | 1 + - st.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- + st.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- st.h | 1 + - 3 files changed, 52 insertions(+), 1 deletion(-) + x.c | 3 +++ + 4 files changed, 56 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h -index 91ab8ca..7c75246 100644 +index 2cd740a..897e12a 100644 --- a/config.def.h +++ b/config.def.h @@ -201,6 +201,7 @@ static Shortcut shortcuts[] = { @@ -22,19 +23,20 @@ index 91ab8ca..7c75246 100644 /* diff --git a/st.c b/st.c -index d6478f5..1ff98e7 100644 +index 57c6e96..bf4edfd 100644 --- a/st.c +++ b/st.c -@@ -20,6 +20,8 @@ +@@ -20,6 +20,9 @@ #include "st.h" #include "win.h" ++extern char **g_argv; +extern char *argv0; + #if defined(__linux) #include <pty.h> #elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) -@@ -28,6 +30,10 @@ +@@ -28,6 +31,10 @@ #include <libutil.h> #endif @@ -45,7 +47,7 @@ index d6478f5..1ff98e7 100644 /* Arbitrary sizes */ #define UTF_INVALID 0xFFFD #define UTF_SIZ 4 -@@ -796,7 +802,7 @@ ttynew(const char *line, char *cmd, const char *out, char **args) +@@ -796,7 +803,7 @@ ttynew(const char *line, char *cmd, const char *out, char **args) if (s > 2) close(s); #ifdef __OpenBSD__ @@ -54,7 +56,7 @@ index d6478f5..1ff98e7 100644 die("pledge\n"); #endif execsh(cmd, args); -@@ -806,6 +812,7 @@ ttynew(const char *line, char *cmd, const char *out, char **args) +@@ -806,6 +813,7 @@ ttynew(const char *line, char *cmd, const char *out, char **args) if (pledge("stdio rpath tty proc", NULL) == -1) die("pledge\n"); #endif @@ -62,7 +64,7 @@ index d6478f5..1ff98e7 100644 close(s); cmdfd = m; signal(SIGCHLD, sigchld); -@@ -1054,6 +1061,48 @@ tswapscreen(void) +@@ -1054,6 +1062,48 @@ tswapscreen(void) tfulldirt(); } @@ -97,7 +99,7 @@ index d6478f5..1ff98e7 100644 + break; + case 0: + chdir_by_pid(pid); -+ execlp("/proc/self/exe", argv0, NULL); ++ execvp("/proc/self/exe", g_argv); + exit(1); + break; + default: @@ -123,6 +125,27 @@ index fd3b0d8..f2b03b0 100644 void printscreen(const Arg *); void printsel(const Arg *); void sendbreak(const Arg *); +diff --git a/x.c b/x.c +index 2407c7e..0f0d28c 100644 +--- a/x.c ++++ b/x.c +@@ -16,6 +16,7 @@ + #include <X11/Xft/Xft.h> + #include <X11/XKBlib.h> + ++char **g_argv; + char *argv0; + #include "arg.h" + #include "st.h" +@@ -2053,6 +2054,8 @@ main(int argc, char *argv[]) + xw.isfixed = False; + xsetcursor(cursorshape); + ++ g_argv = argv; ++ + ARGBEGIN { + case 'a': + allowaltscreen = 0; -- -2.42.0 +2.44.0 diff --git a/.config/sys/etc/portage/patches/x11-terms/st/0004-split-borderpx-into-x-and-y-components.patch b/.config/sys/etc/portage/patches/x11-terms/st/0004-split-borderpx-into-x-and-y-components.patch @@ -1,4 +1,4 @@ -From 633516be81f66e74e51513867f3d867e6e23d713 Mon Sep 17 00:00:00 2001 +From 486578ac5eaa7650e7c2157c3d9f10195a083b32 Mon Sep 17 00:00:00 2001 From: Randy Palamar <palamar@ualberta.ca> Date: Tue, 24 Oct 2023 05:57:20 -0600 Subject: [PATCH] split borderpx into x and y components @@ -9,7 +9,7 @@ Subject: [PATCH] split borderpx into x and y components 2 files changed, 51 insertions(+), 33 deletions(-) diff --git a/config.def.h b/config.def.h -index 7c75246..e26287b 100644 +index 897e12a..90d9712 100644 --- a/config.def.h +++ b/config.def.h @@ -6,7 +6,7 @@ @@ -22,10 +22,10 @@ index 7c75246..e26287b 100644 /* * What program is execed by st depends of these precedence rules: diff --git a/x.c b/x.c -index 58789c7..8530a28 100644 +index 0f0d28c..d7dd85e 100644 --- a/x.c +++ b/x.c -@@ -61,6 +61,8 @@ static void zoomabs(const Arg *); +@@ -62,6 +62,8 @@ static void zoomabs(const Arg *); static void zoomreset(const Arg *); static void ttysend(const Arg *); static void recolor(const Arg *); @@ -34,7 +34,7 @@ index 58789c7..8530a28 100644 /* config.h for applying patches and the configuration. */ #include "config.h" -@@ -333,7 +335,7 @@ ttysend(const Arg *arg) +@@ -334,7 +336,7 @@ ttysend(const Arg *arg) int evcol(XEvent *e) { @@ -43,7 +43,7 @@ index 58789c7..8530a28 100644 LIMIT(x, 0, win.tw - 1); return x / win.cw; } -@@ -341,7 +343,7 @@ evcol(XEvent *e) +@@ -342,7 +344,7 @@ evcol(XEvent *e) int evrow(XEvent *e) { @@ -52,7 +52,7 @@ index 58789c7..8530a28 100644 LIMIT(y, 0, win.th - 1); return y / win.ch; } -@@ -736,8 +738,8 @@ cresize(int width, int height) +@@ -737,8 +739,8 @@ cresize(int width, int height) if (height != 0) win.h = height; @@ -63,7 +63,7 @@ index 58789c7..8530a28 100644 col = MAX(1, col); row = MAX(1, row); -@@ -873,10 +875,10 @@ xhints(void) +@@ -874,10 +876,10 @@ xhints(void) sizeh->width = win.w; sizeh->height_inc = win.ch; sizeh->width_inc = win.cw; @@ -78,7 +78,7 @@ index 58789c7..8530a28 100644 if (xw.isfixed) { sizeh->flags |= PMaxSize; sizeh->min_width = sizeh->max_width = win.w; -@@ -1154,8 +1156,8 @@ xinit(int cols, int rows) +@@ -1155,8 +1157,8 @@ xinit(int cols, int rows) xloadcols(); /* adjust fixed window geometry */ @@ -89,7 +89,7 @@ index 58789c7..8530a28 100644 if (xw.gm & XNegative) xw.l += DisplayWidth(xw.dpy, xw.scr) - win.w - 2; if (xw.gm & YNegative) -@@ -1244,7 +1246,7 @@ xinit(int cols, int rows) +@@ -1245,7 +1247,7 @@ xinit(int cols, int rows) int xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x, int y) { @@ -98,7 +98,7 @@ index 58789c7..8530a28 100644 ushort mode, prevmode = USHRT_MAX; Font *font = &dc.font; int frcflags = FRC_NORMAL; -@@ -1377,7 +1379,7 @@ void +@@ -1378,7 +1380,7 @@ void xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, int y) { int charlen = len * ((base.mode & ATTR_WIDE) ? 2 : 1); @@ -107,7 +107,7 @@ index 58789c7..8530a28 100644 width = charlen * win.cw; Color *fg, *bg, *temp, revfg, revbg, truefg, truebg; XRenderColor colfg, colbg; -@@ -1467,17 +1469,17 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i +@@ -1468,17 +1470,17 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i /* Intelligent cleaning up of the borders. */ if (x == 0) { @@ -131,7 +131,7 @@ index 58789c7..8530a28 100644 xclear(winx, winy + win.ch, winx + width, win.h); /* Clean up the region we want to draw to. */ -@@ -1571,35 +1573,35 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) +@@ -1572,35 +1574,35 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) case 3: /* Blinking Underline */ case 4: /* Steady Underline */ XftDrawRect(xw.draw, &drawcol, @@ -179,7 +179,7 @@ index 58789c7..8530a28 100644 win.cw, 1); } } -@@ -1694,8 +1696,8 @@ xximspot(int x, int y) +@@ -1701,8 +1703,8 @@ xximspot(int x, int y) if (xw.ime.xic == NULL) return; @@ -190,7 +190,7 @@ index 58789c7..8530a28 100644 XSetICValues(xw.ime.xic, XNPreeditAttributes, xw.ime.spotlist, NULL); } -@@ -1913,6 +1915,22 @@ resize(XEvent *e) +@@ -1920,6 +1922,22 @@ resize(XEvent *e) cresize(e->xconfigure.width, e->xconfigure.height); } @@ -214,5 +214,5 @@ index 58789c7..8530a28 100644 recolor(const Arg *A) { -- -2.42.0 +2.44.0