fix(system,x11): set system-wide TERM=xterm-256color and C.UTF-8 locale
This commit is contained in:
@@ -74,7 +74,7 @@ static unsigned int cursorthickness = 2;
|
||||
static int bellvolume = 0;
|
||||
|
||||
/* default TERM value */
|
||||
char *termname = "st-256color";
|
||||
char *termname = "xterm-256color";
|
||||
|
||||
/*
|
||||
* spaces per tab
|
||||
|
||||
@@ -74,7 +74,7 @@ static unsigned int cursorthickness = 2;
|
||||
static int bellvolume = 0;
|
||||
|
||||
/* default TERM value */
|
||||
char *termname = "st-256color";
|
||||
char *termname = "xterm-256color";
|
||||
|
||||
/*
|
||||
* spaces per tab
|
||||
|
||||
@@ -715,6 +715,14 @@ execsh(char *cmd, char **args)
|
||||
setenv("SHELL", sh, 1);
|
||||
setenv("HOME", pw->pw_dir, 1);
|
||||
setenv("TERM", termname, 1);
|
||||
setenv("CHARSET", "UTF-8", 1);
|
||||
setenv("LANG", "C.UTF-8", 1);
|
||||
setenv("LC_ALL", "C.UTF-8", 1);
|
||||
setenv("LC_COLLATE", "C.UTF-8", 1);
|
||||
setenv("EDITOR", "nano", 0);
|
||||
setenv("VISUAL", "nano", 0);
|
||||
setenv("PAGER", "less -RXF", 0);
|
||||
setenv("LESS", "-RXF", 0);
|
||||
|
||||
signal(SIGCHLD, SIG_DFL);
|
||||
signal(SIGHUP, SIG_DFL);
|
||||
|
||||
+2
-2
@@ -881,8 +881,8 @@ xclear(int x1, int y1, int x2, int y2)
|
||||
void
|
||||
xhints(void)
|
||||
{
|
||||
XClassHint class = {opt_name ? opt_name : termname,
|
||||
opt_class ? opt_class : termname};
|
||||
XClassHint class = {opt_name ? opt_name : "st-256color",
|
||||
opt_class ? opt_class : "st-256color"};
|
||||
XWMHints wm = {.flags = InputHint, .input = 1};
|
||||
XSizeHints *sizeh;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user