diff --git a/config.h b/config.h index 88f76c1..b0f7939 100644 --- a/config.h +++ b/config.h @@ -5,7 +5,7 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char *font = "Cousine:size=12"; +static char *font = "FuraCodeNerdFontMono:size=15"; static int borderpx = 2; /* @@ -16,7 +16,7 @@ static int borderpx = 2; * 4: value of shell in /etc/passwd * 5: value of shell in config.h */ -static char *shell = "/bin/ksh"; +static char *shell = "/bin/ksh -i"; char *utmp = NULL; /* scroll program: to enable use a string like "scroll" */ char *scroll = NULL; @@ -34,7 +34,7 @@ static float chscale = 1.0; * * More advanced example: L" `'\"()[]{}" */ -wchar_t *worddelimiters = L" `'\"()[]{}·»"; +wchar_t *worddelimiters = L" `'\"()[]{}·»‘’;"; /* selection timeouts (in milliseconds) */ static unsigned int doubleclicktimeout = 300; diff --git a/x.c b/x.c index 7fd97e8..226b504 100644 --- a/x.c +++ b/x.c @@ -728,17 +728,26 @@ void cresize(int width, int height) { int col, row; + Arg larg; if (width != 0) win.w = width; if (height != 0) win.h = height; + larg.f = (win.w - 2 * borderpx) / 50; + if(larg.f > 22) + larg.f = 22; + if(larg.f < 4) + larg.f = 4; + xunloadfonts(); + xloadfonts(usedfont, larg.f); + col = (win.w - 2 * borderpx) / win.cw; row = (win.h - 2 * borderpx) / win.ch; col = MAX(1, col); row = MAX(1, row); - + //printf("col: %d, row: %d, cw: %d, ch: %d, w: %d, h: %d f: %.0f\n", col, row, win.cw, win.ch, win.w, win.h, larg.f); tresize(col, row); xresize(col, row); ttyresize(win.tw, win.th); @@ -1906,7 +1915,6 @@ resize(XEvent *e) { if (e->xconfigure.width == win.w && e->xconfigure.height == win.h) return; - cresize(e->xconfigure.width, e->xconfigure.height); }