st-flexipatch

My st-flexipatch configuration
git clone git://git.ethandl.dev/st-flexipatch
Log | Files | Refs | README | LICENSE

commit 499b7fbc195c7b6eac2bd383f243695550a440b0
parent 34cd955f148709e5adc5fce380f6528944f144e2
Author: step <step-@users.noreply.github.com>
Date:   Sat, 24 Sep 2022 10:40:33 +0200

XRESOURCES_RELOAD_PATCH reload fonts + re-render (#84)

This patch 1) improves reloading X resources - by considering fonts in
a way nearly identical to function `zoomabs`' - and 2) re-renders st so
that changed colors and fonts can be seen.
Diffstat:
Mpatch/xresources.c | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/patch/xresources.c b/patch/xresources.c @@ -62,7 +62,21 @@ reload_config(int sig) config_init(dpy); xloadcols(); + + /* nearly like zoomabs() */ + xunloadfonts(); + xloadfonts(font, 0); /* font <- config_init() */ + #if FONT2_PATCH + xloadsparefonts(); + #endif // FONT2_PATCH + cresize(0, 0); redraw(); + xhints(); + XCloseDisplay(dpy); + + /* from https://st.suckless.org/patches/xresources-with-reload-signal */ + /* triggers re-render if we're visible */ + ttywrite("\033[O", 3, 1); } #endif // XRESOURCES_RELOAD_PATCH