Fix Terminal Check
This commit is contained in:
parent
1f510e2b32
commit
60f5009cf8
1 changed files with 3 additions and 3 deletions
6
neofetch
6
neofetch
|
@ -1640,14 +1640,14 @@ get_term() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Check $PPID for terminal emulator.
|
# Check $PPID for terminal emulator.
|
||||||
while [[ -z "$term" ]]; do
|
while [[ -z "$term" ]] || ((parent>1)); do
|
||||||
parent="$(get_ppid "$parent")"
|
parent="$(get_ppid "$parent")"
|
||||||
name="$(get_process_name "$parent")"
|
name="$(get_process_name "$parent")"
|
||||||
case "${name// }" in
|
case "${name// }" in
|
||||||
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
|
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
|
||||||
"login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;;
|
"login"* | *"Login"* | "init" | "(init)") term="$(tty)";break ;;
|
||||||
"ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;;
|
"ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;;
|
||||||
"gnome-terminal-") term="gnome-terminal" ;;
|
"gnome-terminal-") term="gnome-terminal";break ;;
|
||||||
*) term="${name##*/}" ;;
|
*) term="${name##*/}" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue