From a06329db1be2b7b00f1a437478c32222b046871e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 29 Oct 2016 15:19:04 +1100 Subject: [PATCH] getterm: Use /proc/$PPID/comm instead of ps --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 81262213..576bba5a 100755 --- a/neofetch +++ b/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