From f9f32ef28b0405524ce2160daaec0ea896aa961e Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 19 Jan 2016 12:12:41 +1100 Subject: [PATCH] GPU: Added support for OS X and Windows --- fetch | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fetch b/fetch index b06563ef..6dc08605 100755 --- a/fetch +++ b/fetch @@ -638,7 +638,12 @@ getgpu () { ;; "Mac OS X") - + gpu=$( \ + system_profiler SPDisplaysDataType | \ + awk -F': ' '/^\ *Chipset Model:/ {print $2}' | \ + awk '{ printf "%s / ", $0 }' + ) + gpu=${gpu//'/ $'} ;; "BSD") @@ -654,7 +659,8 @@ getgpu () { "Windows") - + gpu=$(wmic path Win32_VideoController get caption) + gpu=$(tail -1 <<< ${gpu}) ;; esac }