mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 09:08:38 +00:00
Fix Terminal Check
This commit is contained in:
6
neofetch
6
neofetch
@@ -1640,10 +1640,9 @@ get_term() {
|
||||
esac
|
||||
|
||||
# Check $PPID for terminal emulator.
|
||||
while [[ -z "$term" ]] || ((parent > 1)); do
|
||||
|
||||
while [[ -z "$term" ]]; do
|
||||
parent="$(get_ppid "$parent")"
|
||||
name="$(get_process_name "$parent")"
|
||||
|
||||
case "${name// }" in
|
||||
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
|
||||
"login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;;
|
||||
@@ -1651,7 +1650,6 @@ get_term() {
|
||||
"gnome-terminal-") term="gnome-terminal" ;;
|
||||
*) term="${name##*/}" ;;
|
||||
esac
|
||||
break;
|
||||
done
|
||||
|
||||
# Log that the function was run.
|
||||
|
Reference in New Issue
Block a user