diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2024-04-16 03:09:36 -0700 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2024-04-16 03:09:36 -0700 |
commit | 14b7fd8302c2c99edc4e02d84bdada537e5f8654 (patch) | |
tree | df9594d7d38c129d2adf2316160acd202566d313 | |
parent | e3195738f2b9424e2d4de5aef889d4ddca010336 (diff) |
alacritty use default TERM, send COLORTERM for server ls show color
More see alacritty.toml config comments notes.
-rw-r--r-- | home/xyz/.config/alacritty/alacritty.toml | 20 | ||||
-rw-r--r-- | home/xyz/.ssh/config | 13 |
2 files changed, 31 insertions, 2 deletions
diff --git a/home/xyz/.config/alacritty/alacritty.toml b/home/xyz/.config/alacritty/alacritty.toml index cb7582f3..c6544a8f 100644 --- a/home/xyz/.config/alacritty/alacritty.toml +++ b/home/xyz/.config/alacritty/alacritty.toml @@ -5,8 +5,24 @@ vi_mode_style = "Block" # 1. when set TERM use alacritty on windows, syntax is very bad # 2. need to set xterm-256color if want ls show color when use ssh -[env] -TERM = "xterm-256color" +# But this is actually a wrong/bad workaround and not real fix for issue 2 above. I should not do this. +# The correct way is to the patch to add `TERM alacritty` in coreutils git repo src/dircolors.hin +# But the patch does not go through +# related coreutils ls issues mailing list: +# https://lists.gnu.org/archive/html/bug-coreutils/2024-04/msg00022.html +# https://lists.gnu.org/archive/html/bug-coreutils/2024-04/msg00020.html +# https://lists.gnu.org/archive/html/coreutils/2021-10/msg00007.html +# related alacritty issues: +# https://github.com/alacritty/alacritty/issues/3901 +# https://github.com/alacritty/alacritty/issues/3606 +# https://github.com/alacritty/alacritty/issues/2210 +# https://github.com/alacritty/alacritty/issues/3705 +# https://github.com/alacritty/alacritty/issues/4710 +# I choose a more correct workaround to pass COLORTERM to ssh +# If some remote server doesn't work well e.g.: can't install alacritty, +# I then choose to set TERM to st in ssh config for that server +#[env] +#TERM = "xterm-256color" [font] size = 8.0 diff --git a/home/xyz/.ssh/config b/home/xyz/.ssh/config index 3c82f3d2..7f13ac99 100644 --- a/home/xyz/.ssh/config +++ b/home/xyz/.ssh/config @@ -2,6 +2,9 @@ # another approach is to put it under `HOST *` # https://unix.stackexchange.com/a/577490/459013 AddKeysToAgent yes +# If use alacritty, need send COLORTERM env to remote server to let remote server ls show color, +# more see alacritty.toml config +SendEnv COLORTERM # tabs and empty only for readability, without also works, not sure about newline Host studio @@ -33,6 +36,16 @@ Host qw Host hpc Hostname coe-hpc1.sjsu.edu User 012404405 + # I could not get this HPC to install alacritty terminfo to ~/.terminfo by `infocmp | ssh studio 'tic -x /dev/stdin'`. + # And the HPC does not have alacritty terminfo in /usr/share/terminfo/a. + # And it has issues when me using alacritty as TERM env. And manual copy terminfo to ~/.terminfo does not fix the issues. + # Issues are `htop` and `vim` errors. + # I still want to use alacritty as TERM env on my laptop, so I choose to set TERM env here. xterm-256color and st-256color both works, + # but I want to use alacritty colorscheme. It seems if I set st or xterm as TERM env, alacritty colorscheme is used, + # maybe because those TERM env means truecolor? + # https://wiki.archlinux.org/title/Alacritty#Terminal_functionality_unavailable_in_remote_shells + # https://github.com/alacritty/alacritty/issues/3901 + SetEnv TERM=st Host ia Hostname ia.flylightning.xyz |