mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 17:09:21 +00:00
Term: Add a fallback to ps.
This commit is contained in:
7
neofetch
7
neofetch
@@ -1452,10 +1452,15 @@ getterm() {
|
||||
name="${name/*\/}"
|
||||
;;
|
||||
|
||||
*)
|
||||
"Linux")
|
||||
parent="$(grep -F "PPid:" "/proc/${1:-$PPID}/status")"
|
||||
name="$(< "/proc/${parent/PPid:[[:space:]]}/comm")"
|
||||
;;
|
||||
|
||||
*)
|
||||
parent="$(ps -p ${1:-$PPID} -o ppid=)"
|
||||
name="$(ps -p $parent -o comm=)"
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${name// }" in
|
||||
|
Reference in New Issue
Block a user