Merge branch 'term_font' of github.com:dylanaraps/neofetch into term_font
specially if it merges an updated upstream into a topic branch.
This commit is contained in:
commit
2bf353eaab
7
neofetch
7
neofetch
|
@ -1738,13 +1738,18 @@ getfont () {
|
||||||
# Terminal Emulator {{{
|
# Terminal Emulator {{{
|
||||||
|
|
||||||
getterm () {
|
getterm () {
|
||||||
|
[ -n "$ITERM_PROFILE" ] && term="iTerm2"
|
||||||
|
|
||||||
|
# Check $PPID for terminal emulator.
|
||||||
|
if [ -z "$term" ]; then
|
||||||
parent="$(ps -p ${1:-$PPID} -o ppid=)"
|
parent="$(ps -p ${1:-$PPID} -o ppid=)"
|
||||||
name="$(ps -p $parent -o comm=)"
|
name="$(ps -p $parent -o comm=)"
|
||||||
|
|
||||||
case "$name" in
|
case "$name" in
|
||||||
"${SHELL/*\/}" | *"sh") getterm "$parent" ;;
|
"${SHELL/*\/}" | *"sh" | "tmux") getterm "$parent" ;;
|
||||||
*) term="$name" ;;
|
*) term="$name" ;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
Reference in New Issue