iTerm2 detection
This commit is contained in:
parent
e223b034ef
commit
6a96072efe
5
neofetch
5
neofetch
|
@ -1738,6 +1738,10 @@ 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=)"
|
||||||
|
|
||||||
|
@ -1745,6 +1749,7 @@ getterm () {
|
||||||
"${SHELL/*\/}" | *"sh" | "tmux") getterm "$parent" ;;
|
"${SHELL/*\/}" | *"sh" | "tmux") getterm "$parent" ;;
|
||||||
*) term="$name" ;;
|
*) term="$name" ;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
Reference in New Issue