@@ 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();
@@ 695,7 695,7 @@ brelease(XEvent *e)
return;
}
- if (e->xbutton.button == Button2)
+ if (e->xbutton.button == Button3)
selpaste(NULL);
else if (e->xbutton.button == Button1)
mousesel(e, 1);