t* st + patches and config URI git clone git://git.codevoid.de/st-sdk DIR Log DIR Files DIR Refs DIR README DIR LICENSE --- DIR commit 5f82eaba0438e6c0ab52d2a410ad53923afef3b7 DIR parent 3077ca5b97b60df520fdc6eb9c17cb895b77a4fa URI Author: Stefan Hagen <sh+git[at]codevoid[dot]de> Date: Thu, 14 Nov 2019 21:46:18 +0100 font+fix-colors Diffstat: M config.h | 28 ++++++++++++++-------------- M st.c | 14 ++++++++++++-- 2 files changed, 26 insertions(+), 16 deletions(-) --- DIR diff --git a/config.h b/config.h t@@ -5,13 +5,13 @@ * * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ -static char *font = "GoMono-12"; +static char *font = "Terminus-12"; static int borderpx = 2; static int borderperc = 20; -int disablebold = 0; -int disableitalic = 0; -int disableroman = 0; +int disablebold = 1; +int disableitalic = 1; +int disableroman = 1; #define histsize 2000 t@@ -105,29 +105,29 @@ unsigned int tabspaces = 8; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { - /* solarized dark */ - "#000000", /* 0: black */ + /* c0dev0id custom */ + "#181818", /* 0: black */ "#dc322f", /* 1: red */ "#859900", /* 2: green */ "#b58900", /* 3: yellow */ "#268bd2", /* 4: blue */ "#d33682", /* 5: magenta */ "#2aa198", /* 6: cyan */ - "#eee8d5", /* 7: white */ + "#D6D5D3", /* 7: white */ "#000000", /* 8: brblack */ "#cb4b16", /* 9: brred */ - "#586e75", /* 10: brgreen */ - "#657b83", /* 11: bryellow */ - "#839496", /* 12: brblue */ - "#6c71c4", /* 13: brmagenta*/ - "#93a1a1", /* 14: brcyan */ - "#fdf6e3", /* 15: brwhite */ + "#5B6900", /* 10: brgreen */ + "#7E6000", /* 11: bryellow */ + "#045E9D", /* 12: brblue */ + "#A62E68", /* 13: brmagenta*/ + "#127E76", /* 14: brcyan */ + "#eee8d5", /* 15: brwhite */ [255] = 0, /* more colors can be added after 255 to use with DefaultXX */ "#990000", - "#111111", + "#181818", }; DIR diff --git a/st.c b/st.c t@@ -739,8 +739,10 @@ sigchld(int a) if (pid != p) return; - if (!WIFEXITED(stat) || WEXITSTATUS(stat)) - die("child finished with error '%d'\n", stat); + if (WIFEXITED(stat) && WEXITSTATUS(stat)) + die("child exited with status %d\n", WEXITSTATUS(stat)); + else if (WIFSIGNALED(stat)) + die("child terminated due to signal %d\n", WTERMSIG(stat)); exit(0); } t@@ -810,9 +812,17 @@ ttynew(char *line, char *cmd, char *out, char **args) die("ioctl TIOCSCTTY failed: %s\n", strerror(errno)); close(s); close(m); +#ifdef __OpenBSD__ + if (pledge("stdio getpw proc exec", NULL) == -1) + die("pledge\n"); +#endif execsh(cmd, args); break; default: +#ifdef __OpenBSD__ + if (pledge("stdio rpath tty proc", NULL) == -1) + die("pledge\n"); +#endif close(s); cmdfd = m; signal(SIGCHLD, sigchld);