New Luke st update config.h
This commit is contained in:
parent
58e01b0e61
commit
0aafd2828a
68
st/config.h
68
st/config.h
|
@ -42,9 +42,14 @@ static unsigned int tripleclicktimeout = 600;
|
||||||
/* alt screens */
|
/* alt screens */
|
||||||
int allowaltscreen = 1;
|
int allowaltscreen = 1;
|
||||||
|
|
||||||
/* frames per second st should at maximum draw to the screen */
|
/*
|
||||||
static unsigned int xfps = 120;
|
* draw latency range in ms - from new content/keypress/etc until drawing.
|
||||||
static unsigned int actionfps = 30;
|
* 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 = 8;
|
||||||
|
static double maxlatency = 33;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
|
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
|
||||||
|
@ -52,11 +57,30 @@ static unsigned int actionfps = 30;
|
||||||
*/
|
*/
|
||||||
static unsigned int blinktimeout = 800;
|
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
|
* thickness of underline and bar cursors
|
||||||
*/
|
*/
|
||||||
static unsigned int cursorthickness = 2;
|
static unsigned int cursorthickness = 2;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 1: render most of the lines/blocks characters without using the font for
|
||||||
|
* perfect alignment between cells (U2500 - U259F except dashes/diagonals).
|
||||||
|
* Bold affects lines thickness if boxdraw_bold is not 0. Italic is ignored.
|
||||||
|
* 0: disable (render all U25XX glyphs normally from the font).
|
||||||
|
*/
|
||||||
|
const int boxdraw = 1;
|
||||||
|
const int boxdraw_bold = 1;
|
||||||
|
|
||||||
|
/* braille (U28XX): 1: render as adjacent "pixels", 0: use font */
|
||||||
|
const int boxdraw_braille = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
|
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
|
||||||
* it
|
* it
|
||||||
|
@ -84,7 +108,7 @@ char *termname = "st-256color";
|
||||||
unsigned int tabspaces = 4;
|
unsigned int tabspaces = 4;
|
||||||
|
|
||||||
/* bg opacity */
|
/* bg opacity */
|
||||||
float alpha = 0.92;
|
float alpha = 1.0;
|
||||||
|
|
||||||
/* Terminal colors (16 first used in escape sequence) */
|
/* Terminal colors (16 first used in escape sequence) */
|
||||||
static const char *colorname[] = {
|
static const char *colorname[] = {
|
||||||
|
@ -106,9 +130,10 @@ static const char *colorname[] = {
|
||||||
"#ebdbb2",
|
"#ebdbb2",
|
||||||
[255] = 0,
|
[255] = 0,
|
||||||
/* more colors can be added after 255 to use with DefaultXX */
|
/* more colors can be added after 255 to use with DefaultXX */
|
||||||
"#282828", /* 256 -> bg */
|
"#add8e6", /* 256 -> cursor */
|
||||||
"#ebdbb2", /* 257 -> fg */
|
"#555555", /* 257 -> rev cursor*/
|
||||||
"#add8e6", /* 258 -> cursor */
|
"#282828", /* 258 -> bg */
|
||||||
|
"#ebdbb2", /* 259 -> fg */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,10 +141,10 @@ static const char *colorname[] = {
|
||||||
* Default colors (colorname index)
|
* Default colors (colorname index)
|
||||||
* foreground, background, cursor, reverse cursor
|
* foreground, background, cursor, reverse cursor
|
||||||
*/
|
*/
|
||||||
unsigned int defaultfg = 257;
|
unsigned int defaultfg = 259;
|
||||||
unsigned int defaultbg = 256;
|
unsigned int defaultbg = 258;
|
||||||
static unsigned int defaultcs = 258;
|
static unsigned int defaultcs = 256;
|
||||||
static unsigned int defaultrcs = 0;
|
static unsigned int defaultrcs = 257;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default shape of cursor
|
* Default shape of cursor
|
||||||
|
@ -155,6 +180,7 @@ static unsigned int defaultattr = 11;
|
||||||
*/
|
*/
|
||||||
ResourcePref resources[] = {
|
ResourcePref resources[] = {
|
||||||
{ "font", STRING, &font },
|
{ "font", STRING, &font },
|
||||||
|
{ "fontalt0", STRING, &font2[0] },
|
||||||
{ "color0", STRING, &colorname[0] },
|
{ "color0", STRING, &colorname[0] },
|
||||||
{ "color1", STRING, &colorname[1] },
|
{ "color1", STRING, &colorname[1] },
|
||||||
{ "color2", STRING, &colorname[2] },
|
{ "color2", STRING, &colorname[2] },
|
||||||
|
@ -171,13 +197,11 @@ ResourcePref resources[] = {
|
||||||
{ "color13", STRING, &colorname[13] },
|
{ "color13", STRING, &colorname[13] },
|
||||||
{ "color14", STRING, &colorname[14] },
|
{ "color14", STRING, &colorname[14] },
|
||||||
{ "color15", STRING, &colorname[15] },
|
{ "color15", STRING, &colorname[15] },
|
||||||
{ "background", STRING, &colorname[256] },
|
{ "background", STRING, &colorname[258] },
|
||||||
{ "foreground", STRING, &colorname[257] },
|
{ "foreground", STRING, &colorname[259] },
|
||||||
{ "cursorColor", STRING, &colorname[258] },
|
{ "cursorColor", STRING, &colorname[256] },
|
||||||
{ "termname", STRING, &termname },
|
{ "termname", STRING, &termname },
|
||||||
{ "shell", STRING, &shell },
|
{ "shell", STRING, &shell },
|
||||||
{ "xfps", INTEGER, &xfps },
|
|
||||||
{ "actionfps", INTEGER, &actionfps },
|
|
||||||
{ "blinktimeout", INTEGER, &blinktimeout },
|
{ "blinktimeout", INTEGER, &blinktimeout },
|
||||||
{ "bellvolume", INTEGER, &bellvolume },
|
{ "bellvolume", INTEGER, &bellvolume },
|
||||||
{ "tabspaces", INTEGER, &tabspaces },
|
{ "tabspaces", INTEGER, &tabspaces },
|
||||||
|
@ -185,6 +209,7 @@ ResourcePref resources[] = {
|
||||||
{ "cwscale", FLOAT, &cwscale },
|
{ "cwscale", FLOAT, &cwscale },
|
||||||
{ "chscale", FLOAT, &chscale },
|
{ "chscale", FLOAT, &chscale },
|
||||||
{ "alpha", FLOAT, &alpha },
|
{ "alpha", FLOAT, &alpha },
|
||||||
|
{ "ximspot_update_interval", INTEGER, &ximspot_update_interval },
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -212,12 +237,10 @@ MouseKey mkeys[] = {
|
||||||
{ Button5, TERMMOD, zoom, {.f = -1} },
|
{ Button5, TERMMOD, zoom, {.f = -1} },
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *openurlcmd[] = { "/bin/sh", "-c",
|
static char *openurlcmd[] = { "/bin/sh", "-c", "st-urlhandler", "externalpipe", NULL };
|
||||||
"sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./&%?=_-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)'| uniq | sed 's/^www./http:\\/\\/www\\./g' | dmenu -i -p 'Follow which url?' -l 10 | xargs -r xdg-open",
|
|
||||||
"externalpipe", NULL };
|
|
||||||
|
|
||||||
static char *copyurlcmd[] = { "/bin/sh", "-c",
|
static char *copyurlcmd[] = { "/bin/sh", "-c",
|
||||||
"sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https)://|www\\.)[a-zA-Z0-9.]*[:]?[a-zA-Z0-9./&%?=_-]*)|((magnet:\\?xt=urn:btih:)[a-zA-Z0-9]*)' | uniq | sed 's/^www./http:\\/\\/www\\./g' | dmenu -i -p 'Copy which url?' -l 10 | tr -d '\n' | xclip -selection clipboard",
|
"tmp=$(sed 's/.*│//g' | tr -d '\n' | grep -aEo '(((http|https)://|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 };
|
"externalpipe", NULL };
|
||||||
|
|
||||||
static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL };
|
static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout", "externalpipe", NULL };
|
||||||
|
@ -231,10 +254,12 @@ static Shortcut shortcuts[] = {
|
||||||
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
|
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
|
||||||
{ TERMMOD, XK_Next, zoom, {.f = -1} },
|
{ TERMMOD, XK_Next, zoom, {.f = -1} },
|
||||||
{ MODKEY, XK_Home, zoomreset, {.f = 0} },
|
{ MODKEY, XK_Home, zoomreset, {.f = 0} },
|
||||||
|
/* { MODKEY, XK_c, clipcopy, {.i = 0} }, */
|
||||||
|
{ ControlMask, XK_s, clipcopy, {.i = 0} },
|
||||||
{ ShiftMask, XK_Insert, clippaste, {.i = 0} },
|
{ ShiftMask, XK_Insert, clippaste, {.i = 0} },
|
||||||
{ ALTMOD, XK_C, clipcopy, {.i = 0} },
|
|
||||||
{ ControlMask, XK_v, clippaste, {.i = 0} },
|
{ ControlMask, XK_v, clippaste, {.i = 0} },
|
||||||
{ ControlMask, XK_p, selpaste, {.i = 0} },
|
{ ControlMask, XK_p, selpaste, {.i = 0} },
|
||||||
|
{ XK_ANY_MOD, Button2, selpaste, {.i = 0} },
|
||||||
{ MODKEY, XK_Num_Lock, numlock, {.i = 0} },
|
{ MODKEY, XK_Num_Lock, numlock, {.i = 0} },
|
||||||
{ MODKEY, XK_Control_L, iso14755, {.i = 0} },
|
{ MODKEY, XK_Control_L, iso14755, {.i = 0} },
|
||||||
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
|
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
|
||||||
|
@ -256,7 +281,6 @@ static Shortcut shortcuts[] = {
|
||||||
{ MODKEY, XK_l, externalpipe, {.v = openurlcmd } },
|
{ MODKEY, XK_l, externalpipe, {.v = openurlcmd } },
|
||||||
{ MODKEY, XK_y, externalpipe, {.v = copyurlcmd } },
|
{ MODKEY, XK_y, externalpipe, {.v = copyurlcmd } },
|
||||||
{ MODKEY, XK_o, externalpipe, {.v = copyoutput } },
|
{ MODKEY, XK_o, externalpipe, {.v = copyoutput } },
|
||||||
{ MODKEY, XK_q, keyboard_select,{ 0 } },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue