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
View File
@@ -0,0 +1 @@
LANG=C.UTF-8
+5
View File
@@ -4,6 +4,11 @@ export EDITOR=nano
export VISUAL=nano
export PAGER="less -RXF"
export LESS="-RXF"
export TERM=xterm-256color
export CHARSET=UTF-8
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export LC_COLLATE=C.UTF-8
umask 022
# use nicer PS1 for bash and busybox ash
+4
View File
@@ -0,0 +1,4 @@
export CHARSET=UTF-8
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export LC_COLLATE=C.UTF-8
@@ -109,6 +109,11 @@ _sxmo_load_environments() {
export VISUAL="${VISUAL:-nano}"
export PAGER="less -RXF"
export LESS="-RXF"
export TERM=xterm-256color
export CHARSET=UTF-8
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export LC_COLLATE=C.UTF-8
export BROWSER="${BROWSER:-firefox}"
export SHELL="${SHELL:-/bin/sh}"
+1
View File
@@ -16,6 +16,7 @@ dwm.selbordercolor: #005577
dwm.selfgcolor: #ffffff
st.font: Fira Code:pixelsize=18:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color
st.background: #1c1c1c
st.foreground: #e5e5e5
st.cursorColor: #cccccc
@@ -75,6 +75,11 @@ export EDITOR="nano"
export VISUAL="nano"
export PAGER="less -RXF"
export LESS="-RXF"
export TERM="xterm-256color"
export CHARSET="UTF-8"
export LANG="C.UTF-8"
export LC_ALL="C.UTF-8"
export LC_COLLATE="C.UTF-8"
export SXMO_WM="dwm"
export SXMO_MENU="dmenu"
export SXMO_TERMINAL="st"
+5
View File
@@ -4,6 +4,11 @@ export EDITOR=nano
export VISUAL=nano
export PAGER="less -RXF"
export LESS="-RXF"
export TERM=xterm-256color
export CHARSET=UTF-8
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export LC_COLLATE=C.UTF-8
export SXMO_WM=dwm
export SXMO_MENU=dmenu
export SXMO_TERMINAL=st
+1
View File
@@ -16,6 +16,7 @@ dwm.selbordercolor: #005577
dwm.selfgcolor: #ffffff
st.font: Fira Code:pixelsize=18:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color
st.background: #1c1c1c
st.foreground: #e5e5e5
st.cursorColor: #cccccc
@@ -75,6 +75,11 @@ export EDITOR="nano"
export VISUAL="nano"
export PAGER="less -RXF"
export LESS="-RXF"
export TERM="xterm-256color"
export CHARSET="UTF-8"
export LANG="C.UTF-8"
export LC_ALL="C.UTF-8"
export LC_COLLATE="C.UTF-8"
export SXMO_WM="dwm"
export SXMO_MENU="dmenu"
export SXMO_TERMINAL="st"
+5
View File
@@ -4,6 +4,11 @@ export EDITOR=nano
export VISUAL=nano
export PAGER="less -RXF"
export LESS="-RXF"
export TERM=xterm-256color
export CHARSET=UTF-8
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export LC_COLLATE=C.UTF-8
export SXMO_WM=dwm
export SXMO_MENU=dmenu
export SXMO_TERMINAL=st
@@ -21,6 +21,11 @@ export EDITOR=nano
export VISUAL=nano
export PAGER="less -RXF"
export LESS="-RXF"
export TERM=xterm-256color
export CHARSET=UTF-8
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export LC_COLLATE=C.UTF-8
export SXMO_DISABLE_LEDS=1
export SXMO_NO_VIRTUAL_KEYBOARD=1
export NO_AT_BRIDGE=1
Binary file not shown.
+5
View File
@@ -3,6 +3,11 @@
# Copyright 2022 Sxmo Contributors
# shellcheck disable=SC2086
export TERM=xterm-256color
export CHARSET=UTF-8
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
SXMO_TERMINAL="${SXMO_TERMINAL:-st}"
if [ -z "$*" ]; then
@@ -16,6 +16,7 @@ dwm.selbordercolor: #005577
dwm.selfgcolor: #ffffff
st.font: Fira Code:pixelsize=18:style=Regular:antialias=true:autohint=true
st.termname: xterm-256color
st.background: #1c1c1c
st.foreground: #e5e5e5
st.cursorColor: #cccccc
@@ -75,6 +75,11 @@ export EDITOR="nano"
export VISUAL="nano"
export PAGER="less -RXF"
export LESS="-RXF"
export TERM="xterm-256color"
export CHARSET="UTF-8"
export LANG="C.UTF-8"
export LC_ALL="C.UTF-8"
export LC_COLLATE="C.UTF-8"
export SXMO_WM="dwm"
export SXMO_MENU="dmenu"
export SXMO_TERMINAL="st"
@@ -191,7 +191,7 @@ case "$WMCLASS" in
"
WINNAME=St
;;
st|st-*|*terminal*|org.gnome.vte.application|org.gnome.vte.app.gtk4|*alacritty*)
st|st-*|xterm*|*terminal*|org.gnome.vte.application|org.gnome.vte.app.gtk4|*alacritty*)
# These git commands only launch the editor.
case "$WMNAME" in
Binary file not shown.
+1 -1
View File
@@ -214,7 +214,7 @@ ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
EOF
echo "LANG=en_US.UTF-8" > "$ROOTFS/etc/locale.conf"
echo "LANG=C.UTF-8" > "$ROOTFS/etc/locale.conf"
if [ -f "$ROOTFS/usr/share/zoneinfo/UTC" ]; then
cp "$ROOTFS/usr/share/zoneinfo/UTC" "$ROOTFS/etc/localtime"
echo "UTC" > "$ROOTFS/etc/timezone"
+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;