Skip to content

Commit 0838009

Browse files
[PR] dylanaraps/neofetch#1923 from easyaspi314 - Add detection for Termux terminal
Upstream PR: dylanaraps/neofetch#1923 Thanks to @easyaspi314 Co-authored-by: easyaspi314 (Devin) <easyaspi314@users.noreply.github.com>
2 parents 5679316 + c4630ee commit 0838009

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

neofetch

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3440,7 +3440,6 @@ get_term() {
34403440
[[ "$TERM" == "tw52" || "$TERM" == "tw100" ]] && term="TosWin2"
34413441
[[ "$SSH_CONNECTION" ]] && term="$SSH_TTY"
34423442
[[ "$WT_SESSION" ]] && term="Windows Terminal"
3443-
[[ "$TERMUX_VERSION" ]] && term="Termux $TERMUX_VERSION"
34443443

34453444
# Check $PPID for terminal emulator.
34463445
while [[ -z "$term" ]]; do
@@ -3482,6 +3481,10 @@ get_term() {
34823481
done
34833482

34843483
[[ $FIG_TERM == "1" ]] && term="$term + Fig"
3484+
3485+
# Termux sets TERMUX_VERSION. Put this after the PPID check because this is
3486+
# also set if using a terminal on an X server.
3487+
[[ -z "$term" && "$TERMUX_VERSION" ]] && term="Termux ${TERMUX_VERSION}"
34853488

34863489
# Log that the function was run.
34873490
term_run=1

0 commit comments

Comments
 (0)