fix(system,x11): set system-wide TERM=xterm-256color and C.UTF-8 locale

This commit is contained in:
Luxferre
2026-10-21 00:16:33 +03:00
parent 262d1a3649
commit da24f0d9ac
22 changed files with 67 additions and 6 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+8
View File
@@ -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
View File
@@ -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;