diff options
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 79 |
1 files changed, 31 insertions, 48 deletions
@@ -5,20 +5,22 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char *font = "mono:pixelsize=14:antialias=true:autohint=true"; +static char *font = "mono:pixelsize=12:antialias=true:autohint=true"; static char *font2[] = { "JoyPixels:pixelsize=10: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 = "scroll"; 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 @@ -176,6 +175,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 +208,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 +217,6 @@ ResourcePref resources[] = { { "cwscale", FLOAT, &cwscale }, { "chscale", FLOAT, &chscale }, { "alpha", FLOAT, &alpha }, - { "ximspot_update_interval", INTEGER, &ximspot_update_interval }, }; /* @@ -217,27 +224,23 @@ 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_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 -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} }, @@ -246,23 +249,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_Page_Up, kscrollup, {.i = -1} }, - { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} }, - { MODKEY, XK_Page_Up, kscrollup, {.i = -1} }, - { MODKEY, XK_Page_Down, kscrolldown, {.i = -1} }, - { MODKEY, XK_k, kscrollup, {.i = 1} }, - { MODKEY, XK_j, kscrolldown, {.i = 1} }, - { MODKEY, XK_Up, kscrollup, {.i = 1} }, - { MODKEY, XK_Down, kscrolldown, {.i = 1} }, - { MODKEY, XK_u, kscrollup, {.i = -1} }, - { MODKEY, XK_d, kscrolldown, {.i = -1} }, + { ShiftMask, XK_Insert, selpaste, {.i = 0} }, + { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, { MODKEY, XK_s, changealpha, {.f = -0.05} }, { MODKEY, XK_a, changealpha, {.f = +0.05} }, { TERMMOD, XK_Up, zoom, {.f = +1} }, @@ -291,10 +285,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 @@ -314,13 +304,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. */ |