From 1f510e2b3267d2106fa0cb40a8cd431397ca66e2 Mon Sep 17 00:00:00 2001 From: Takeya Yuki Date: Sat, 20 May 2017 21:36:51 +0900 Subject: [PATCH] Fix Terminal Check --- neofetch | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index 24ad3386..4f29f239 100755 --- a/neofetch +++ b/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.