]> git.wh0rd.org - home.git/commitdiff
profile.d: set utf-8 terminal mode by default
authorMike Frysinger <vapier@gentoo.org>
Sat, 15 Feb 2020 22:33:01 +0000 (17:33 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 15 Feb 2020 22:33:07 +0000 (17:33 -0500)
.profile.d/utf8.sh [new file with mode: 0644]

diff --git a/.profile.d/utf8.sh b/.profile.d/utf8.sh
new file mode 100644 (file)
index 0000000..7345c68
--- /dev/null
@@ -0,0 +1,11 @@
+if [ "${TERM}" != "dumb" ]; then
+       # First use the temp transition.  Not all terminals support the next mode.
+       printf '\e%%G'
+       # Then use the perm transition and hope it works.
+       printf '\e%%/I'
+       # Wipe out things in case the terminal doesn't either escape sequence.
+       printf '\r     \r'
+
+       # Tell ncurses to not be dumb.
+       export NCURSES_NO_UTF8_ACS=1
+fi