Only fall back to TERMUX_VERSION if ppid doesn't match
Catches something like running xfce4-terminal in an X server
This commit is contained in:
parent
da1970edd5
commit
c4630ee215
1 changed files with 4 additions and 1 deletions
5
neofetch
5
neofetch
|
|
@ -3292,7 +3292,6 @@ get_term() {
|
||||||
[[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && term="TosWin2"
|
[[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && term="TosWin2"
|
||||||
[[ "$SSH_CONNECTION" ]] && term="$SSH_TTY"
|
[[ "$SSH_CONNECTION" ]] && term="$SSH_TTY"
|
||||||
[[ "$WT_SESSION" ]] && term="Windows Terminal"
|
[[ "$WT_SESSION" ]] && term="Windows Terminal"
|
||||||
[[ "$TERMUX_VERSION" ]] && term="Termux ${TERMUX_VERSION}"
|
|
||||||
|
|
||||||
# Check $PPID for terminal emulator.
|
# Check $PPID for terminal emulator.
|
||||||
while [[ -z "$term" ]]; do
|
while [[ -z "$term" ]]; do
|
||||||
|
|
@ -3332,6 +3331,10 @@ get_term() {
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Termux sets TERMUX_VERSION. Put this after the PPID check because this is
|
||||||
|
# also set if using a terminal on an X server.
|
||||||
|
[[ -z "$term" && "$TERMUX_VERSION" ]] && term="Termux ${TERMUX_VERSION}"
|
||||||
|
|
||||||
# Log that the function was run.
|
# Log that the function was run.
|
||||||
term_run=1
|
term_run=1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue