commit f35ea526cd88b4497dc12ff32de2d1de7c53e246
parent f933ff16a7f1c91592639e244da7f16eb7dfa1fd
Author: siduck76 <siduckk76@protonmail.com>
Date: Tue, 26 Jan 2021 10:27:26 +0530
patch : bold is not bright
Diffstat:
1 file changed, 23 insertions(+), 0 deletions(-)
diff --git a/x.c.orig b/x.c.orig
@@ -2155,6 +2155,28 @@ usage(void)
" [stty_args ...]\n", argv0, argv0);
}
+void
+reload(int sig)
+{
+ config_init();
+
+ /* colors, fonts */
+ xloadcols();
+ xunloadfonts();
+ usedfont = (opt_font == NULL)? font : opt_font;
+ xloadfonts(usedfont, 0);
+
+ /* pretend the window just got resized */
+ cresize(win.w, win.h);
+
+ redraw();
+
+ /* triggers re-render if we're visible. */
+ ttywrite("\033[O", 3, 1);
+
+ signal(SIGUSR1, reload);
+}
+
int
main(int argc, char *argv[])
{
@@ -2225,6 +2247,7 @@ run:
config_init();
cols = MAX(cols, 1);
rows = MAX(rows, 1);
+ signal(SIGUSR1, reload);
tnew(cols, rows);
xinit(cols, rows);
xsetenv();