Fix text-console detection vim

This commit is contained in:
Akemi Izuko 2023-11-12 17:08:01 -07:00
parent c05c613c8d
commit 4aefb8ab48
Signed by: akemi
GPG key ID: 8DE0764E1809E9FC

View file

@ -139,7 +139,7 @@ command! Light3 :colo base16-atelier-estuary-light | FH
command! Light4 :colo base16-atelier-plateau-light | FH command! Light4 :colo base16-atelier-plateau-light | FH
" Switch theme to match terminal ==== " Switch theme to match terminal ====
if !has('termguicolors') || !has('gui_running') if !has('termguicolors') || system("ps -e | awk '$4 ~ /Xorg|alacritty|sway/ {has_gui = 1} END {print has_gui + 0}'") == "0"
colo default colo default
elseif executable('colo.sh') elseif executable('colo.sh')
exec 'colo ' . system('colo.sh --colorscheme') exec 'colo ' . system('colo.sh --colorscheme')