From cc9095ccd5bcd31383fb51d754cd998d118e16d6 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 25 Oct 2016 10:39:56 +1100 Subject: [PATCH] Refactor GPU --- neofetch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index 214fb195..bd2f45b7 100755 --- a/neofetch +++ b/neofetch @@ -987,12 +987,12 @@ getcpu_usage() { getgpu() { case "$os" in "Linux") - gpu="$(PATH="/sbin:$PATH" lspci | grep -F "3D")" + gpu="$(PATH="/sbin:$PATH" lspci -mm | awk -F '\\"|\\" \\"' '/3D|VGA/ {print $3 " " $4}')" # If a GPU with a prefix of '3D' doesn't exist # fallback to looking for a prefix of 'VGA' - [ -z "$gpu" ] && \ - gpu="$(PATH="/sbin:$PATH" lspci | grep -F "VGA")" + # [ -z "$gpu" ] && \ + # gpu="$(PATH="/sbin:$PATH" lspci | grep -F "VGA")" gpu="${gpu//??':'??'.'?}" @@ -2427,7 +2427,7 @@ info() { eval output="\$${1}" else - "get$2" 2>/dev/null + time "get$2" 2>/dev/null eval output="\$${2}" fi