diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2021-11-06 21:02:26 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2021-11-06 21:02:26 -0700 |
| commit | e8e1c62ce069e6f5a1ede5cd2d7824cb7492583f (patch) | |
| tree | 621f87a4979636d4ae5901542dce483406894058 /config.h | |
| parent | 072e1764185eb5f9e60414dda41194d09d2bdf38 (diff) | |
updated
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 90 |
1 files changed, 43 insertions, 47 deletions
@@ -5,20 +5,22 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char *font = "JetBrainsMonoMedium Nerd Font:pixelsize=16:antialias=true:autohint=true"; -static char *font2[] = { "Noto Color Emoji:pixelsize=10:antialias=true:autohint=true" }; -static int borderpx = 10; +static char *font = "mono:pixelsize=22:antialias=true:autohint=true"; +static char *font2[] = { "JoyPixels:pixelsize=20:antialias=true:autohint=true" }; +static int borderpx = 2; /* * What program is execed by st depends of these precedence rules: * 1: program passed with -e - * 2: utmp option + * 2: scroll and/or utmp * 3: SHELL environment variable * 4: value of shell in /etc/passwd * 5: value of shell in config.h */ static char *shell = "/bin/sh"; char *utmp = NULL; +/* scroll program: to enable use a string like "scroll" */ +char *scroll = NULL; char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; /* identification sequence returned in DA and DECID */ @@ -42,6 +44,10 @@ 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 @@ -58,13 +64,6 @@ static double maxlatency = 33; static unsigned int blinktimeout = 800; /* - * interval (in milliseconds) between each successive call to ximspot. This - * improves terminal performance while not reducing functionality to those - * whom need XIM support. - */ -int ximspot_update_interval = 1000; - -/* * thickness of underline and bar cursors */ static unsigned int cursorthickness = 2; @@ -76,10 +75,10 @@ static unsigned int cursorthickness = 2; * 0: disable (render all U25XX glyphs normally from the font). */ const int boxdraw = 1; -const int boxdraw_bold = 1; +const int boxdraw_bold = 0; /* braille (U28XX): 1: render as adjacent "pixels", 0: use font */ -const int boxdraw_braille = 1; +const int boxdraw_braille = 0; /* * bell volume. It must be a value between -100 and 100. Use 0 for disabling @@ -108,7 +107,9 @@ char *termname = "xterm-256color"; unsigned int tabspaces = 8; /* bg opacity */ -float alpha = 0.90; +float alpha = 0.8; +float alphaOffset = 0.0; +float alphaUnfocus; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { @@ -145,6 +146,7 @@ unsigned int defaultfg = 259; unsigned int defaultbg = 258; unsigned int defaultcs = 256; unsigned int defaultrcs = 257; +unsigned int background = 258; /* * Default shape of cursor @@ -176,6 +178,13 @@ static unsigned int mousebg = 0; 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; + +/* * Xresources preferences to load at startup */ ResourcePref resources[] = { @@ -202,6 +211,8 @@ ResourcePref resources[] = { { "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 }, @@ -209,7 +220,7 @@ ResourcePref resources[] = { { "cwscale", FLOAT, &cwscale }, { "chscale", FLOAT, &chscale }, { "alpha", FLOAT, &alpha }, - { "ximspot_update_interval", INTEGER, &ximspot_update_interval }, + { "alphaOffset", FLOAT, &alphaOffset }, }; /* @@ -217,31 +228,25 @@ ResourcePref resources[] = { * Beware that overloading Button1 will disable the selection. */ static MouseShortcut mshortcuts[] = { - /* button mask string */ - { Button4, XK_NO_MOD, "\031" }, - { Button5, XK_NO_MOD, "\005" }, + /* mask button function argument release */ + { XK_NO_MOD, Button4, kscrollup, {.i = 1} }, + { XK_NO_MOD, Button5, kscrolldown, {.i = 1} }, + { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, + { 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"} }, }; /* Internal keyboard shortcuts. */ #define MODKEY Mod1Mask #define TERMMOD (Mod1Mask|ShiftMask) -MouseKey mkeys[] = { - /* button mask function argument */ - { Button4, XK_NO_MOD, kscrollup, {.i = 1} }, - { Button5, XK_NO_MOD, kscrolldown, {.i = 1} }, - { Button4, TERMMOD, zoom, {.f = +1} }, - { Button5, TERMMOD, zoom, {.f = -1} }, -}; - -static char *openurlcmd[] = { "/bin/sh", "-c", "st-urlhandler", "externalpipe", NULL }; - -static char *copyurlcmd[] = { "/bin/sh", "-c", - "tmp=$(sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https|gopher|gemini|ftp|ftps|git)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./@$&%?$#=_-~]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)' | uniq | sed 's/^www./http:\\/\\/www\\./g' ); IFS=; [ ! -z $tmp ] && echo $tmp | dmenu -i -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard", - "externalpipe", NULL }; - +static char *openurlcmd[] = { "/bin/sh", "-c", "st-urlhandler -o", "externalpipe", NULL }; +static char *copyurlcmd[] = { "/bin/sh", "-c", "st-urlhandler -c", "externalpipe", NULL }; static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL }; + static Shortcut shortcuts[] = { /* mask keysym function argument */ { XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} }, @@ -250,13 +255,14 @@ static Shortcut shortcuts[] = { { XK_ANY_MOD, XK_Print, printsel, {.i = 0} }, { TERMMOD, XK_Prior, zoom, {.f = +1} }, { TERMMOD, XK_Next, zoom, {.f = -1} }, - { MODKEY, XK_Home, zoomreset, {.f = 0} }, + { TERMMOD, XK_Home, zoomreset, {.f = 0} }, + { TERMMOD, XK_C, clipcopy, {.i = 0} }, + { TERMMOD, XK_V, clippaste, {.i = 0} }, { MODKEY, XK_c, clipcopy, {.i = 0} }, { ShiftMask, XK_Insert, clippaste, {.i = 0} }, { MODKEY, XK_v, clippaste, {.i = 0} }, - { XK_ANY_MOD, Button2, selpaste, {.i = 0} }, - { MODKEY, XK_Num_Lock, numlock, {.i = 0} }, - { MODKEY, XK_Control_L, iso14755, {.i = 0} }, + { ShiftMask, XK_Insert, selpaste, {.i = 0} }, + { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} }, { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} }, { MODKEY, XK_Page_Up, kscrollup, {.i = -1} }, @@ -295,10 +301,6 @@ static Shortcut shortcuts[] = { * * 0: no value * * > 0: cursor application mode enabled * * < 0: cursor application mode disabled - * crlf value - * * 0: no value - * * > 0: crlf mode is enabled - * * < 0: crlf mode is disabled * * Be careful with the order of the definitions because st searches in * this table sequentially, so any XK_ANY_MOD must be in the last @@ -318,13 +320,6 @@ static KeySym mappedkeys[] = { -1 }; static uint ignoremod = Mod2Mask|XK_SWITCH_MOD; /* - * Override mouse-select 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 forceselmod = ShiftMask; - -/* * This is the huge key array which defines all compatibility to the Linux * world. Please decide about changes wisely. */ @@ -560,3 +555,4 @@ static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?" "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" "`abcdefghijklmnopqrstuvwxyz{|}~"; + |
