cyclefonts: keybind to cycle fonts (agree with st-xresources-signal-reloading)

This patch is an update to the 20210604, which fixes zoomreset.

Because the cyclefonts function doesn't change the defaultfontsize
variable, zoomreset function resets all fonts to the size of the first
one loaded.

With this patch, zoomreset will reset the font to the specified fontsize
This commit is contained in:
Justinas Grigas
2022-07-31 10:43:14 +03:00
committed by Łukasz Pankowski
parent f37ea1f018
commit 02739346a8
2 changed files with 24 additions and 9 deletions

View File

@@ -5,7 +5,15 @@
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
static char *fonts[] = {
"FiraCode Nerd Font:size=10",
"Monaspace Neon:size=10",
"Monaspace Argon:size=10",
"Monaspace Xenon:size=10",
"Monaspace Radon:size=10",
"Monaspace Krypton:size=10",
};
static size_t currentfont = 0;
static int borderpx = 2;
@@ -254,6 +262,7 @@ static Shortcut shortcuts[] = {
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
{ MODKEY, XK_c, normalMode, {.i = 0} },
{ TERMMOD, XK_S, cyclefonts, {} },
};
/*