X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=config.def.h;h=a5672a307c6e9a8f4642ec6db02615c88a490037;hb=HEAD;hp=82b1b095ce7003897c9dc5c065d92abd0835884b;hpb=8ed7a4b3b755407a7724a586ef224051bc306f4f;p=st.git diff --git a/config.def.h b/config.def.h index 82b1b09..85b56c8 100644 --- a/config.def.h +++ b/config.def.h @@ -1,3 +1,5 @@ +#include + /* See LICENSE file for copyright and license details. */ /* @@ -5,19 +7,21 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true"; -static int borderpx = 2; +static char *font = "Go Mono:size=15:antialias=true"; +static int borderpx = 0; /* * 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"; +static char *shell = "/bin/zsh"; 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 */ @@ -30,9 +34,9 @@ static float chscale = 1.0; /* * word delimiter string * - * More advanced example: " `'\"()[]{}" + * More advanced example: L" `'\"()[]{}" */ -char *worddelimiters = " "; +wchar_t *worddelimiters = L" ·→│»« "; /* selection timeouts (in milliseconds) */ static unsigned int doubleclicktimeout = 300; @@ -41,15 +45,24 @@ static unsigned int tripleclicktimeout = 600; /* alt screens */ int allowaltscreen = 1; -/* frames per second st should at maximum draw to the screen */ -static unsigned int xfps = 120; -static unsigned int actionfps = 30; +/* 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 = 2; +static double maxlatency = 33; /* * blinking timeout (set to 0 to disable blinking) for the terminal blinking * attribute. */ -static unsigned int blinktimeout = 800; +static unsigned int blinktimeout = 250; /* * thickness of underline and bar cursors @@ -63,7 +76,7 @@ static unsigned int cursorthickness = 2; static int bellvolume = 0; /* default TERM value */ -char *termname = "st-256color"; +char *termname = "screen-256color"; /* * spaces per tab @@ -109,6 +122,8 @@ static const char *colorname[] = { /* more colors can be added after 255 to use with DefaultXX */ "#cccccc", "#555555", + "gray90", /* default foreground colour */ + "black", /* default background colour */ }; @@ -118,17 +133,22 @@ static const char *colorname[] = { */ unsigned int defaultfg = 7; unsigned int defaultbg = 0; -static unsigned int defaultcs = 256; +unsigned int defaultcs = 10; static unsigned int defaultrcs = 257; /* * Default shape of cursor + * 0: Blinking block + * 1: Blinking block (default) * 2: Block ("█") + * 3: Blinking underline * 4: Underline ("_") + * 5: Blinking bar * 6: Bar ("|") + * 7: Blinking st cursor * 7: Snowman ("☃") */ -static unsigned int cursorshape = 2; +static unsigned int cursorshape = 1; /* * Default columns and rows numbers @@ -140,8 +160,8 @@ 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 mouseshape = XC_left_ptr; +static unsigned int mousefg = 14; static unsigned int mousebg = 0; /* @@ -150,14 +170,24 @@ 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; + /* * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. */ static MouseShortcut mshortcuts[] = { - /* button mask string */ - { Button4, XK_ANY_MOD, "\031" }, - { Button5, XK_ANY_MOD, "\005" }, + /* mask button function argument release */ + { 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. */ @@ -173,11 +203,13 @@ static Shortcut shortcuts[] = { { 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} }, + /* { 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} }, - { TERMMOD, XK_I, iso14755, {.i = 0} }, + + { MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} }, }; /* @@ -195,10 +227,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 @@ -217,13 +245,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. @@ -439,6 +460,12 @@ static Key key[] = { { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0}, { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0}, { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0}, + + { XK_Menu, XK_NO_MOD, "", 0, 0}, + { XK_Super_R, XK_NO_MOD, "", 0, 0}, + { XK_Scroll_Lock, XK_NO_MOD, "[", 0, 0}, + { XKB_KEY_XF86AudioRaiseVolume, XK_NO_MOD, "0", 0, 0}, + { XKB_KEY_XF86AudioLowerVolume, XK_NO_MOD, "9", 0, 0}, }; /*