abbiefetch/gpu_detection.6

11 lines
610 B
Groff
Raw Normal View History

2024-11-12 17:53:59 +00:00
if [ "$hasglxinfo" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -z "$graphics" ]; then
if [ -n "$(glxinfo 2>/dev/null | grep "OpenGL renderer string" | awk -F ": " '{print $2}' | awk -F "(" '{print $1}')" ]; then
graphics="$(glxinfo 2>/dev/null | grep "OpenGL renderer string" | awk -F ": " '{print $2}' | awk -F "(" '{print $1}')"
fi
fi
if [ "$haslspci" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -z "$graphics" ]; then
if [ -n "$(lspci | grep "VGA compatible controller" | awk -F "controller: " '{print $2}')" ]; then
graphics="$(lspci | grep "VGA compatible controller" | awk -F "controller: " '{print $2}')"
fi
fi