From df6dab1721e43ca8e2056c2e0ba8f665c2207591 Mon Sep 17 00:00:00 2001 From: Takeya Yuki Date: Sat, 20 May 2017 22:17:56 +0900 Subject: [PATCH] Rollback without PID Check --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 9042bcba..4f29f239 100755 --- a/neofetch +++ b/neofetch @@ -1640,14 +1640,14 @@ 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)";break ;; + "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;; - "gnome-terminal-") term="gnome-terminal";break ;; + "gnome-terminal-") term="gnome-terminal" ;; *) term="${name##*/}" ;; esac done