[F] Fix terminal detection with new get_process_name method
This commit is contained in:
parent
e5c227119f
commit
e1f65895db
1 changed files with 7 additions and 7 deletions
14
neofetch
14
neofetch
|
@ -4029,7 +4029,7 @@ get_term() {
|
||||||
[[ -z "$parent" ]] && break
|
[[ -z "$parent" ]] && break
|
||||||
name="$(get_process_name "$parent")"
|
name="$(get_process_name "$parent")"
|
||||||
|
|
||||||
case ${name// } in
|
case ${name##*/} in
|
||||||
"${SHELL/*\/}"|*"sh"|"screen"|"su"*|"newgrp"|"hyfetch") ;;
|
"${SHELL/*\/}"|*"sh"|"screen"|"su"*|"newgrp"|"hyfetch") ;;
|
||||||
|
|
||||||
"login"*|*"Login"*|"init"|"(init)")
|
"login"*|*"Login"*|"init"|"(init)")
|
||||||
|
@ -4045,12 +4045,12 @@ get_term() {
|
||||||
[[ $name =~ \.(.*)-wrap.* ]] && term=${BASH_REMATCH[1]}
|
[[ $name =~ \.(.*)-wrap.* ]] && term=${BASH_REMATCH[1]}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"gnome-terminal-") term="gnome-terminal" ;;
|
"gnome-terminal-"*) term="gnome-terminal" ;;
|
||||||
"kgx") term="gnome-console" ;;
|
"kgx") term="gnome-console" ;;
|
||||||
"cutefish-termin") term="cutefish-terminal" ;;
|
"cutefish-terminal"*) term="cutefish-terminal" ;;
|
||||||
"urxvtd") term="urxvt" ;;
|
"urxvtd") term="urxvt" ;;
|
||||||
*"nvim") term="Neovim Terminal" ;;
|
*"nvim") term="Neovim Terminal" ;;
|
||||||
*"NeoVimServer"*) term="VimR Terminal" ;;
|
*"NeoVimServer"*) term="VimR Terminal" ;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
# Fix issues with long process names on Linux.
|
# Fix issues with long process names on Linux.
|
||||||
|
|
Loading…
Reference in a new issue