New build

This commit is contained in:
2026-01-05 20:52:13 +04:00
parent bd6a2c82f0
commit c21d6541f0
19 changed files with 6655 additions and 327 deletions

108
config.h
View File

@@ -5,7 +5,7 @@
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "CodeNewRoman Nerd Font Mono:pixelsize=18:antialias=true:autohint=true";
static char *font = "CodeNewRoman Nerd Font Mono:pixelsize=12:antialias=true:autohint=true";
static int borderpx = 2;
/*
@@ -53,7 +53,7 @@ int allowwindowops = 0;
* near minlatency, but it waits longer for slow updates to avoid partial draw.
* low minlatency will tear/flicker more, as it can "detect" idle too early.
*/
static double minlatency = 8;
static double minlatency = 2;
static double maxlatency = 33;
/*
@@ -95,29 +95,27 @@ unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
[0] = "#000000", /* black */
[1] = "#cf6a4c", /* red */
[2] = "#99ad6a", /* green */
[3] = "#d8ad4c", /* yellow */
[4] = "#597bc5", /* blue */
[5] = "#a037b0", /* magenta */
[6] = "#71b9f8", /* cyan */
[7] = "#adadad", /* white */
/* 8 bright colors */
[8] = "#424242", /* black */
[9] = "#cf6a4c", /* red */
[10] = "#99ad6a", /* green */
[11] = "#d8ad4c", /* yellow */
[12] = "#597bc5", /* blue */
[13] = "#a037b0", /* magenta */
[14] = "#71b9f8", /* cyan */
[15] = "#ffffff", /* white */
/* special colors */
[256] = "#151515", /* background */
[257] = "#eaeaea", /* foreground */
/* 8 normal colors */
"black",
"red3",
"green3",
"yellow3",
"blue2",
"magenta3",
"cyan3",
"gray90",
/* 8 bright colors */
"gray50",
"red",
"green",
"yellow",
"#5c5cff",
"magenta",
"cyan",
"white",
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
@@ -129,21 +127,13 @@ static const char *colorname[] = {
/*
* Default colors (colorname index)
* foreground, background, cursor
* foreground, background, cursor, reverse cursor
*/
unsigned int defaultfg = 257;
unsigned int defaultbg = 256;
unsigned int defaultcs = 257;
unsigned int defaultfg = 258;
unsigned int defaultbg = 259;
unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
/*
* Colors used, when the specific fg == defaultfg. So in reverse mode this
* will reverse too. Another logic would only make the simple feature too
* complex.
*/
unsigned int defaultitalic = 7;
unsigned int defaultunderline = 7;
/*
* Default shape of cursor
* 2: Block ("█")
@@ -180,6 +170,42 @@ static unsigned int defaultattr = 11;
*/
static uint forcemousemod = ShiftMask;
/*
* Xresources preferences to load at startup
*/
ResourcePref resources[] = {
{ "font", STRING, &font },
{ "color0", STRING, &colorname[0] },
{ "color1", STRING, &colorname[1] },
{ "color2", STRING, &colorname[2] },
{ "color3", STRING, &colorname[3] },
{ "color4", STRING, &colorname[4] },
{ "color5", STRING, &colorname[5] },
{ "color6", STRING, &colorname[6] },
{ "color7", STRING, &colorname[7] },
{ "color8", STRING, &colorname[8] },
{ "color9", STRING, &colorname[9] },
{ "color10", STRING, &colorname[10] },
{ "color11", STRING, &colorname[11] },
{ "color12", STRING, &colorname[12] },
{ "color13", STRING, &colorname[13] },
{ "color14", STRING, &colorname[14] },
{ "color15", STRING, &colorname[15] },
{ "background", STRING, &colorname[259] },
{ "foreground", STRING, &colorname[258] },
{ "cursorColor", STRING, &colorname[256] },
{ "termname", STRING, &termname },
{ "shell", STRING, &shell },
{ "minlatency", INTEGER, &minlatency },
{ "maxlatency", INTEGER, &maxlatency },
{ "blinktimeout", INTEGER, &blinktimeout },
{ "bellvolume", INTEGER, &bellvolume },
{ "tabspaces", INTEGER, &tabspaces },
{ "borderpx", INTEGER, &borderpx },
{ "cwscale", FLOAT, &cwscale },
{ "chscale", FLOAT, &chscale },
};
/*
* Internal mouse shortcuts.
* Beware that overloading Button1 will disable the selection.
@@ -203,14 +229,16 @@ static Shortcut shortcuts[] = {
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
{ MODKEY, XK_Prior, zoom, {.f = +2} },
{ MODKEY, XK_Next, zoom, {.f = -2} },
{ MODKEY, XK_Home, zoomreset, {.f = 0} },
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
{ TERMMOD, XK_Next, zoom, {.f = -1} },
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
{ TERMMOD, XK_V, clippaste, {.i = 0} },
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
{ ShiftMask, XK_Page_Up, kscrollup, {.f = -0.1} },
{ ShiftMask, XK_Page_Down, kscrolldown, {.f = -0.1} },
};
/*