getterm: Use /proc/$PPID/comm instead of ps
This commit is contained in:
parent
41c778f680
commit
a06329db1b
1 changed files with 2 additions and 2 deletions
4
neofetch
4
neofetch
|
@ -1453,8 +1453,8 @@ getterm() {
|
|||
;;
|
||||
|
||||
*)
|
||||
parent="$(ps -p ${1:-$PPID} -o ppid=)"
|
||||
name="$(ps -p $parent -o comm=)"
|
||||
parent="$(grep -F "PPid:" "/proc/${1:-$PPID}/status")"
|
||||
name="$(< "/proc/${parent/PPid:[[:space:]]}/comm")"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue