Revert last two commits
This commit is contained in:
parent
8d33b4051f
commit
ec1705835c
1 changed files with 27 additions and 25 deletions
10
neofetch
10
neofetch
|
@ -1739,16 +1739,17 @@ getfont () {
|
||||||
# Terminal Emulator {{{
|
# Terminal Emulator {{{
|
||||||
|
|
||||||
getterm () {
|
getterm () {
|
||||||
# Check $PPID for terminal emulator.
|
# Workaround for OS X systems that
|
||||||
case "$os" in
|
# don't support the block below.
|
||||||
"Mac OS X")
|
|
||||||
case "$TERM_PROGRAM" in
|
case "$TERM_PROGRAM" in
|
||||||
"iTerm.app") term="iTerm2" ;;
|
"iTerm.app") term="iTerm2" ;;
|
||||||
"Terminal.app") term="Apple Terminal" ;;
|
"Terminal.app") term="Apple Terminal" ;;
|
||||||
*) term="${TERM_PROGRAM/\.app}" ;;
|
*) term="${TERM_PROGRAM/\.app}" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
|
||||||
|
|
||||||
|
# Check $PPID for terminal emulator.
|
||||||
|
if [ -z "$term" ]; then
|
||||||
|
case "$os" in
|
||||||
"Windows")
|
"Windows")
|
||||||
parent="$(ps -p ${1:-$PPID} | awk '{printf $2}')"
|
parent="$(ps -p ${1:-$PPID} | awk '{printf $2}')"
|
||||||
parent=${parent/'PPID'}
|
parent=${parent/'PPID'}
|
||||||
|
@ -1768,6 +1769,7 @@ getterm () {
|
||||||
"${SHELL/*\/}" | *"sh" | "tmux" | "screen" | "systemd") getterm "$parent" ;;
|
"${SHELL/*\/}" | *"sh" | "tmux" | "screen" | "systemd") getterm "$parent" ;;
|
||||||
*) term="$name" ;;
|
*) term="$name" ;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
Loading…
Reference in a new issue