change fontsize
Build/Publish XBPS / build-and-publish (push) Successful in 7s Details

This commit is contained in:
Luca Bilke 2024-04-13 13:30:01 +02:00
parent 5d407b2052
commit f99c8d8ee2
No known key found for this signature in database
GPG Key ID: AD6630D0A1E650AC
1 changed files with 85 additions and 101 deletions

186
config.h
View File

@ -5,13 +5,12 @@
* *
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/ */
static char *font = "FiraCode Nerd Font:size=12"; static char *font = "FiraCode Nerd Font:pixelsize=14";
/* Spare fonts */ /* Spare fonts */
static char *font2[] = { static char *font2[] = {
"Noto Color Emoji:size=11", "Noto Color Emoji:pixelsize=14",
}; };
static int borderpx = 2; static int borderpx = 2;
/* modkey options: ControlMask, ShiftMask or XK_ANY_MOD */ /* modkey options: ControlMask, ShiftMask or XK_ANY_MOD */
@ -127,55 +126,41 @@ float alphaUnfocused = 0.8;
/* Terminal colors (16 first used in escape sequence) */ /* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = { static const char *colorname[] = {
/* 8 normal colors */ /* 8 normal colors */
"#1d202f", "#1d202f", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff",
"#f7768e", "#a9b1d6",
"#9ece6a",
"#e0af68",
"#7aa2f7",
"#bb9af7",
"#7dcfff",
"#a9b1d6",
/* 8 bright colors */ /* 8 bright colors */
"#414868", "#414868", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff",
"#f7768e", "#c0caf5",
"#9ece6a",
"#e0af68",
"#7aa2f7",
"#bb9af7",
"#7dcfff",
"#c0caf5",
[255] = 0, [255] = 0,
/* more colors can be added after 255 to use with DefaultXX */ /* more colors can be added after 255 to use with DefaultXX */
"#c0caf5", /* 256 -> default cursor colour */ "#c0caf5", /* 256 -> default cursor colour */
"#1a1b26", /* 257 -> default inverted cursor colour */ "#1a1b26", /* 257 -> default inverted cursor colour */
"#c0caf5", /* 258 -> default foreground colour */ "#c0caf5", /* 258 -> default foreground colour */
"#1a1b26", /* 259 -> default background colour */ "#1a1b26", /* 259 -> default background colour */
"#c0caf5", /* 260 -> unfocused foreground colour */ "#c0caf5", /* 260 -> unfocused foreground colour */
"#1a1b26", /* 261 -> unfocused background colour */ "#1a1b26", /* 261 -> unfocused background colour */
"#c0caf5", /* 262 -> default selection foreground colour */ "#c0caf5", /* 262 -> default selection foreground colour */
"#33467C", /* 263 -> default selection background colour */ "#33467C", /* 263 -> default selection background colour */
}; };
/* /*
* Default colors (colorname index) * Default colors (colorname index)
* foreground, background, cursor, reverse cursor * foreground, background, cursor, reverse cursor
*/ */
unsigned int defaultcs = 256; unsigned int defaultcs = 256;
unsigned int defaultrcs = 257; unsigned int defaultrcs = 257;
unsigned int defaultfg = 258; unsigned int defaultfg = 258;
unsigned int defaultbg = 0; unsigned int defaultbg = 0;
unsigned int bg = 259; unsigned int bg = 259;
unsigned int bgUnfocused = 261; unsigned int bgUnfocused = 261;
unsigned int selectionfg = 262; unsigned int selectionfg = 262;
unsigned int selectionbg = 263; unsigned int selectionbg = 263;
static int ignoreselfg = 0; static int ignoreselfg = 0;
/* /*
* https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81 * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81
* Default style of cursor * Default style of cursor
@ -202,7 +187,7 @@ static unsigned int rows = 24;
/* /*
* Default shape of the mouse cursor * Default shape of the mouse cursor
*/ */
static char* mouseshape = "xterm"; static char *mouseshape = "xterm";
/* /*
* Color used to display font attributes when fontconfig selected a font which * Color used to display font attributes when fontconfig selected a font which
@ -214,31 +199,31 @@ static unsigned int defaultattr = 11;
* Xresources preferences to load at startup * Xresources preferences to load at startup
*/ */
ResourcePref resources[] = { ResourcePref resources[] = {
{ "color0", STRING, &colorname[0] }, {"color0", STRING, &colorname[0]},
{ "color1", STRING, &colorname[1] }, {"color1", STRING, &colorname[1]},
{ "color2", STRING, &colorname[2] }, {"color2", STRING, &colorname[2]},
{ "color3", STRING, &colorname[3] }, {"color3", STRING, &colorname[3]},
{ "color4", STRING, &colorname[4] }, {"color4", STRING, &colorname[4]},
{ "color5", STRING, &colorname[5] }, {"color5", STRING, &colorname[5]},
{ "color6", STRING, &colorname[6] }, {"color6", STRING, &colorname[6]},
{ "color7", STRING, &colorname[7] }, {"color7", STRING, &colorname[7]},
{ "color8", STRING, &colorname[8] }, {"color8", STRING, &colorname[8]},
{ "color9", STRING, &colorname[9] }, {"color9", STRING, &colorname[9]},
{ "color10", STRING, &colorname[10] }, {"color10", STRING, &colorname[10]},
{ "color11", STRING, &colorname[11] }, {"color11", STRING, &colorname[11]},
{ "color12", STRING, &colorname[12] }, {"color12", STRING, &colorname[12]},
{ "color13", STRING, &colorname[13] }, {"color13", STRING, &colorname[13]},
{ "color14", STRING, &colorname[14] }, {"color14", STRING, &colorname[14]},
{ "color15", STRING, &colorname[15] }, {"color15", STRING, &colorname[15]},
{ "cursorColor", STRING, &colorname[256] }, {"cursorColor", STRING, &colorname[256]},
{ "foreground", STRING, &colorname[258] }, {"foreground", STRING, &colorname[258]},
{ "background", STRING, &colorname[259] }, {"background", STRING, &colorname[259]},
{ "unfocusedForeground", STRING, &colorname[260] }, {"unfocusedForeground", STRING, &colorname[260]},
{ "unfocusedBackground", STRING, &colorname[261] }, {"unfocusedBackground", STRING, &colorname[261]},
{ "selectionForeground", STRING, &colorname[262] }, {"selectionForeground", STRING, &colorname[262]},
{ "selectionBackground", STRING, &colorname[263] }, {"selectionBackground", STRING, &colorname[263]},
{ "alpha", FLOAT, &alpha }, {"alpha", FLOAT, &alpha},
{ "alphaUnfocused",FLOAT, &alphaUnfocused }, {"alphaUnfocused", FLOAT, &alphaUnfocused},
}; };
/* /*
@ -253,45 +238,47 @@ static uint forcemousemod = ShiftMask;
* Beware that overloading Button1 will disable the selection. * Beware that overloading Button1 will disable the selection.
*/ */
static MouseShortcut mshortcuts[] = { static MouseShortcut mshortcuts[] = {
/* mask button function argument release screen */ /* mask button function argument release
// { XK_ANY_MOD, Button2, clippaste, {.i = 0}, 1 }, screen */
// { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} }, // { XK_ANY_MOD, Button2, clippaste, {.i = 0}, 1 },
// { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} }, // { ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
// { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, // { ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
// { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, // { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
// { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
}; };
/* Internal keyboard shortcuts. */ /* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask #define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask) #define TERMMOD (ControlMask | ShiftMask)
static char *openurlcmd[] = { "/bin/sh", "-c", static char *openurlcmd[] = {"/bin/sh", "-c",
"xurls | dmenu -l 10 -w $WINDOWID | xargs -r open", "xurls | dmenu -l 10 -w $WINDOWID | xargs -r open",
"externalpipe", NULL }; "externalpipe", NULL};
static char *setbgcolorcmd[] = { "/bin/sh", "-c", static char *setbgcolorcmd[] = {"/bin/sh", "-c", "printf '\033]11;#008000\007'",
"printf '\033]11;#008000\007'", "externalpipein", NULL};
"externalpipein", NULL };
static Shortcut shortcuts[] = { static Shortcut shortcuts[] = {
/* mask keysym function argument screen */ /* mask keysym function argument screen
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, */
{ ControlMask, XK_Print, toggleprinter, {.i = 0} }, {XK_ANY_MOD, XK_Break, sendbreak, {.i = 0}},
{ ShiftMask, XK_Print, printscreen, {.i = 0} }, {ControlMask, XK_Print, toggleprinter, {.i = 0}},
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, {ShiftMask, XK_Print, printscreen, {.i = 0}},
{ TERMMOD, XK_Prior, zoom, {.f = +3} }, {XK_ANY_MOD, XK_Print, printsel, {.i = 0}},
{ TERMMOD, XK_Next, zoom, {.f = -3} }, {TERMMOD, XK_Prior, zoom, {.f = +3}},
{ TERMMOD, XK_Home, zoomreset, {.f = 0} }, {TERMMOD, XK_Next, zoom, {.f = -3}},
{ TERMMOD, XK_C, clipcopy, {.i = 0} }, {TERMMOD, XK_Home, zoomreset, {.f = 0}},
{ TERMMOD, XK_V, clippaste, {.i = 0} }, {TERMMOD, XK_C, clipcopy, {.i = 0}},
{ TERMMOD, XK_O, changealpha, {.f = +0.05} }, {TERMMOD, XK_V, clippaste, {.i = 0}},
{ TERMMOD, XK_P, changealpha, {.f = -0.05} }, {TERMMOD, XK_O, changealpha, {.f = +0.05}},
//{ TERMMOD, XK_, changealphaunfocused, {.f = +0.05} }, {TERMMOD, XK_P, changealpha, {.f = -0.05}},
//{ TERMMOD, XK_, changealphaunfocused, {.f = -0.05} }, //{ TERMMOD, XK_, changealphaunfocused, {.f = +0.05}
{ TERMMOD, XK_Y, selpaste, {.i = 0} }, //}, { TERMMOD, XK_, changealphaunfocused, {.f =
{ ShiftMask, XK_Insert, selpaste, {.i = 0} }, //-0.05} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, {TERMMOD, XK_Y, selpaste, {.i = 0}},
{ TERMMOD, XK_I, iso14755, {.i = 0} }, {ShiftMask, XK_Insert, selpaste, {.i = 0}},
{TERMMOD, XK_Num_Lock, numlock, {.i = 0}},
{TERMMOD, XK_I, iso14755, {.i = 0}},
}; };
/* /*
@ -315,13 +302,11 @@ static Shortcut shortcuts[] = {
* position for a key. * position for a key.
*/ */
/* /*
* State bits to ignore when matching key or button events. By default, * State bits to ignore when matching key or button events. By default,
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored. * numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
*/ */
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; static uint ignoremod = Mod2Mask | XK_SWITCH_MOD;
/* /*
* Selection types' masks. * Selection types' masks.
@ -331,17 +316,16 @@ static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
* If no match is found, regular selection is used. * If no match is found, regular selection is used.
*/ */
static uint selmasks[] = { static uint selmasks[] = {
[SEL_RECTANGULAR] = Mod1Mask, [SEL_RECTANGULAR] = Mod1Mask,
}; };
/* /*
* Printable characters in ASCII, used to estimate the advance width * Printable characters in ASCII, used to estimate the advance width
* of single wide characters. * of single wide characters.
*/ */
static char ascii_printable[] = static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?"
" !\"#$%&'()*+,-./0123456789:;<=>?" "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" "`abcdefghijklmnopqrstuvwxyz{|}~";
"`abcdefghijklmnopqrstuvwxyz{|}~";
/* /*
* plumb_cmd is run on mouse button 3 click, with argument set to * plumb_cmd is run on mouse button 3 click, with argument set to