diff options
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 89 |
1 files changed, 49 insertions, 40 deletions
@@ -5,22 +5,20 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char *font = "mono:pixelsize=12:antialias=true:autohint=true"; -static char *font2[] = { "JoyPixels:pixelsize=10:antialias=true:autohint=true" }; -static int borderpx = 2; +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; /* * What program is execed by st depends of these precedence rules: * 1: program passed with -e - * 2: scroll and/or utmp + * 2: utmp option * 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 */ @@ -44,10 +42,6 @@ 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 @@ -64,6 +58,13 @@ 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; @@ -75,10 +76,10 @@ static unsigned int cursorthickness = 2; * 0: disable (render all U25XX glyphs normally from the font). */ const int boxdraw = 1; -const int boxdraw_bold = 0; +const int boxdraw_bold = 1; /* braille (U28XX): 1: render as adjacent "pixels", 0: use font */ -const int boxdraw_braille = 0; +const int boxdraw_braille = 1; /* * bell volume. It must be a value between -100 and 100. Use 0 for disabling @@ -87,7 +88,7 @@ const int boxdraw_braille = 0; static int bellvolume = 0; /* default TERM value */ -char *termname = "st-256color"; +char *termname = "xterm-256color"; /* * spaces per tab @@ -107,7 +108,7 @@ char *termname = "st-256color"; unsigned int tabspaces = 8; /* bg opacity */ -float alpha = 0.8; +float alpha = 0.95; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { @@ -152,7 +153,7 @@ unsigned int defaultrcs = 257; * 6: Bar ("|") * 7: Snowman ("☃") */ -static unsigned int cursorshape = 2; +static unsigned int cursorshape = 4; /* * Default columns and rows numbers @@ -175,13 +176,6 @@ 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[] = { @@ -208,8 +202,6 @@ 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 }, @@ -217,6 +209,7 @@ ResourcePref resources[] = { { "cwscale", FLOAT, &cwscale }, { "chscale", FLOAT, &chscale }, { "alpha", FLOAT, &alpha }, + { "ximspot_update_interval", INTEGER, &ximspot_update_interval }, }; /* @@ -224,24 +217,30 @@ ResourcePref resources[] = { * Beware that overloading Button1 will disable the selection. */ static MouseShortcut mshortcuts[] = { - /* 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"} }, + /* button mask string */ + { Button4, XK_NO_MOD, "\031" }, + { Button5, XK_NO_MOD, "\005" }, }; /* Internal keyboard shortcuts. */ #define MODKEY Mod1Mask #define TERMMOD (Mod1Mask|ShiftMask) -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 }; +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 *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL }; static Shortcut shortcuts[] = { /* mask keysym function argument */ @@ -251,14 +250,13 @@ static Shortcut shortcuts[] = { { XK_ANY_MOD, XK_Print, printsel, {.i = 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} }, + { MODKEY, XK_Home, zoomreset, {.f = 0} }, { MODKEY, XK_c, clipcopy, {.i = 0} }, { ShiftMask, XK_Insert, clippaste, {.i = 0} }, { MODKEY, XK_v, clippaste, {.i = 0} }, - { ShiftMask, XK_Insert, selpaste, {.i = 0} }, - { TERMMOD, XK_Num_Lock, numlock, {.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_Page_Up, kscrollup, {.i = -1} }, { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} }, { MODKEY, XK_Page_Up, kscrollup, {.i = -1} }, @@ -297,6 +295,10 @@ 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 @@ -316,6 +318,13 @@ 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. */ |
