all repos — st @ 8e968739c3cfc4e9f7088a9ea360bc4f37e9ad9f

st (suckless terminal) config

Allow more complex delimiters for word selections.

Thanks Alexander Rezinsky <alexrez@gmail.com>!
Christoph Lohmann 20h@r-36.net
commit

8e968739c3cfc4e9f7088a9ea360bc4f37e9ad9f

parent

0c2b513d01697aea20bb4a2a144b55e72c625e86

2 files changed, 11 insertions(+), 2 deletions(-)

jump to
M config.def.hconfig.def.h

@@ -9,7 +9,14 @@ static char font[] = "Liberation Mono:pixelsize=12:antialias=false:autohint=false";

static int borderpx = 2; static char shell[] = "/bin/sh"; -/* timeouts (in milliseconds) */ +/* + * word delimiter string + * + * More advanced example: " `'\"()[]{}" + */ +static char worddelimiters[] = " "; + +/* selection timeouts (in milliseconds) */ static unsigned int doubleclicktimeout = 300; static unsigned int tripleclicktimeout = 600;
M st.cst.c

@@ -707,8 +707,10 @@ break;

} } - if(term.line[*y][*x + direction].c[0] == ' ') + if(strchr(worddelimiters, + term.line[*y][*x + direction].c[0])) { break; + } *x += direction; }