#pragma once static char *font = "JetBrainsMono Nerd Font:pixelsize=15:antialias=true:autohint=true"; static int borderpx = 8; static char *shell = "/bin/zsh"; char *utmp = NULL; char *scroll = NULL; char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; /* identification sequence returned in DA and DECID */ char *vtiden = "\033[?6c"; /* Kerning / character bounding-box multipliers */ static float cwscale = 1.0; static float chscale = 1.0; /* * word delimiter string * * More advanced example: L" `'\"()[]{}" */ wchar_t *worddelimiters = L" "; /* selection timeouts (in milliseconds) */ static unsigned int doubleclicktimeout = 300; static unsigned int tripleclicktimeout = 600; /* alt screens */ int allowaltscreen = 1; /* allow certain non-interactive (insecure) window operations such as: setting the clipboard text */ int allowwindowops = 0; /* * draw latency range in ms - from new content/keypress/etc until drawing. * within this range, st draws when content stops arriving (idle). mostly it's * 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 maxlatency = 33; /* * blinking timeout (set to 0 to disable blinking) for the terminal blinking * attribute. */ static unsigned int blinktimeout = 800; /* * thickness of underline and bar cursors */ static unsigned int cursorthickness = 2; /* * bell volume. It must be a value between -100 and 100. Use 0 for disabling * it */ static int bellvolume = 0; /* default TERM value */ char *termname = "st"; /* * spaces per tab */ unsigned int tabspaces = 4; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { "#1d2021", // or #1C1C1C "#cc241d", "#98971a", "#d79921", "#458588", "#b16286", "#689d6a", "#a89984", "#928374", "#fb4934", "#b8bb26", "#fabd2f", "#83a598", "#d3869b", "#8ec07c", "#ebdbb2" }; /* * Default colors (colorname index) * foreground, background, cursor */ unsigned int defaultfg = 15; unsigned int defaultbg = 0; unsigned int defaultcs = 15; static unsigned int defaultrcs = 0; static unsigned int cursorshape = 2; /* * Default columns and rows numbers */ static unsigned int cols = 80; static unsigned int rows = 24; /* * Default colour and shape of the mouse cursor */ static unsigned int mouseshape = XC_xterm; static unsigned int mousefg = 7; static unsigned int mousebg = 0; /* * Color used to display font attributes when fontconfig selected a font which * doesn't match the ones requested. */ static unsigned int defaultattr = 11; /* * Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set). * Note that if you want to use ShiftMask with selmasks, set this to an other * modifier, set to 0 to not use it. */ static uint forcemousemod = ShiftMask; /* * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. */ static MouseShortcut mshortcuts[] = { /* mask button function argument release */ { ShiftMask, Button4, kscrollup, {.i = 1} }, { ShiftMask, Button5, kscrolldown, {.i = 1} } }; /* Internal keyboard shortcuts. */ #define TERMMOD (ControlMask|ShiftMask) static Shortcut shortcuts[] = { /* mask keysym function argument */ { TERMMOD, XK_C, clipcopy, {.i = 0} }, { TERMMOD, XK_V, clippaste, {.i = 0} } }; /* * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF) * to be mapped below, add them to this array. */ static KeySym mappedkeys[] = { -1 }; static Key key[] = { /* keysym mask string appkey appcursor */ { XK_Up, XK_ANY_MOD, "\033[A", 0, -1}, { XK_Up, XK_ANY_MOD, "\033OA", 0, +1}, { XK_Down, XK_ANY_MOD, "\033[B", 0, -1}, { XK_Down, XK_ANY_MOD, "\033OB", 0, +1}, { XK_Left, XK_ANY_MOD, "\033[D", 0, -1}, { XK_Left, XK_ANY_MOD, "\033OD", 0, +1}, { XK_Right, XK_ANY_MOD, "\033[C", 0, -1}, { XK_Right, XK_ANY_MOD, "\033OC", 0, +1} }; /* * Selection types' masks. * Use the same masks as usual. * Button1Mask is always unset, to make masks match between ButtonPress. * ButtonRelease and MotionNotify. * If no match is found, regular selection is used. */ static uint selmasks[] = { [SEL_RECTANGULAR] = Mod1Mask, }; /* * Printable characters in ASCII, used to estimate the advance width * of single wide characters. */ static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?" "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" "`abcdefghijklmnopqrstuvwxyz{|}~";