From 4437d5b3c3eea76f6e2b0fd4a2ba21c02a098aeb Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sat, 8 Mar 2025 15:21:28 +0900 Subject: updates --- st/config.def.h | 1721 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 893 insertions(+), 828 deletions(-) (limited to 'st/config.def.h') diff --git a/st/config.def.h b/st/config.def.h index 453a78b..8edba7e 100644 --- a/st/config.def.h +++ b/st/config.def.h @@ -1,3 +1,4 @@ +char *externalpipe_sigusr1[] = {"/bin/sh", "-c", "externalpipe_buffer.sh st_strings_read"}; /* See LICENSE file for copyright and license details. */ /* @@ -5,15 +6,22 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ +static size_t currentfont = 0; static char *fonts[] = { - "monospace:pixelsize=16:antialias=true:autohint=true", + "monospace:pixelsize=16:antialias=true:autohint=true", "nerdmono:pixelsize=16:antialias=true:autohint=true", "ko:pixelsize=16:antialias=true:autohint=true", }; -static size_t currentfont = 0; +/* Spare fonts */ static char *font2[] = { - "NotoColorEmoji:pixelsize=14:antialias=true:autohint=true", + "NotoColorEmoji:pixelsize=14:antialias=true:autohint=true", }; + +/* disable bold, italic and roman fonts globally */ +int disablebold = 0; +int disableitalic = 0; +int disableroman = 0; + static int borderpx = 2; /* @@ -36,7 +44,6 @@ char *vtiden = "\033[?6c"; /* Kerning / character bounding-box multipliers */ static float cwscale = 1.0; static float chscale = 1.0; - /* Character rendering offsets in pixels */ static short cxoffset = 0; static short cyoffset = 0; @@ -118,13 +125,14 @@ char *termname = "st-256color"; unsigned int tabspaces = 8; /* bg opacity */ -float alpha = 0.8; +float alpha = 0.8, alphaUnfocused = 0.85; + +/* Background opacity */ float alpha_def; -float alphaOffset = 0.05; -float alphaUnfocus; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { + /* 8 normal colors */ "#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */ "#cc241d", "#839E45", @@ -133,6 +141,8 @@ static const char *colorname[] = { "#b16286", "#689d6a", "#a89984", + + /* 8 bright colors */ "#928374", "#fb4934", "#b8bb26", @@ -141,14 +151,19 @@ static const char *colorname[] = { "#d3869b", "#8ec07c", "#ebdbb2", - [255] = 0, - /* more colors can be added after 255 to use with DefaultXX */ + + [255] = 0, + + /* more colors can be added after 255 to use with DefaultXX */ "#add8e6", /* 256 -> cursor */ "#555555", /* 257 -> rev cursor*/ "#282828", /* 258 -> bg */ "#ebdbb2", /* 259 -> fg */ + "#1d2021", /* 260 */ + "#32302f", /* 261 */ }; + /* * Default colors (colorname index) * foreground, background, cursor, reverse cursor @@ -156,8 +171,50 @@ static const char *colorname[] = { unsigned int defaultfg = 259; unsigned int defaultbg = 258; unsigned int defaultcs = 256; -unsigned int defaultrcs = 257; -unsigned int background = 258; +static unsigned int defaultrcs = 257; +unsigned int bg = 258, bgUnfocused = 261; + +/* + * Xresources preferences to load at startup + */ +ResourcePref resources[] = { + { "fonts", STRING, &fonts }, + { "font2", STRING, &font2 }, + { "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[256] }, + { "foreground", STRING, &colorname[257] }, + { "cursorColor", STRING, &colorname[258] }, + { "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 }, +}; + +/* + * Command used to query unicode glyphs. + */ +char *iso14755_cmd = "dmenu -i -w \"$WINDOWID\" -p codepoint: ?" - "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" - "`abcdefghijklmnopqrstuvwxyz{|}~"; + " !\"#$%&'()*+,-./0123456789:;<=>?" + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~"; + +/* + * Open urls starting with urlprefixes, contatining urlchars + * by passing as ARG1 to urlhandler. + */ +char* urlhandler = "xdg-open"; +char urlchars[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789-._~:/?#@!$&'*+,;=%"; +char* urlprefixes[] = {"http://", "https://", NULL}; -- cgit v1.2.3