From f2300d33062fe337b7f39ef8a8452bb4e7ab1333 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 22 Dec 2017 10:42:58 +1100 Subject: [PATCH] gpu [intel]: Show driver version if glxinfo isn't installed --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 18d81c3a..acf517e4 100755 --- a/neofetch +++ b/neofetch @@ -1244,9 +1244,12 @@ get_gpu() { ;; *"intel"*) - gpu="$(glxinfo | grep "Device:.*Intel")" + type -p glxinfo >/dev/null && \ + gpu="$(glxinfo | grep "Device:.*Intel")" + gpu="${gpu/*Intel/Intel}" gpu="${gpu/'(R)'}" + gpu="${gpu/'Corporation'}" gpu="${gpu/ \(*}" [[ -z "$(trim "$gpu")" ]] && gpu="Intel Integrated Graphics"