commit
639537aef3
1 changed files with 12 additions and 11 deletions
23
neofetch
23
neofetch
|
@ -976,10 +976,16 @@ get_gpu() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
gpu="$(system_profiler SPDisplaysDataType | awk -F': ' '/^\ *Chipset Model:/ {printf $2 ", "}')"
|
if [[ -f "${cache_dir}/neofetch/gpu" ]]; then
|
||||||
gpu="${gpu//'/ $'}"
|
source "${cache_dir}/neofetch/gpu"
|
||||||
gpu="${gpu%,*}"
|
|
||||||
cache "gpu" "$gpu"
|
else
|
||||||
|
gpu="$(system_profiler SPDisplaysDataType | awk -F': ' '/^\ *Chipset Model:/ {printf $2 ", "}')"
|
||||||
|
gpu="${gpu//'/ $'}"
|
||||||
|
gpu="${gpu%,*}"
|
||||||
|
|
||||||
|
cache "gpu" "$gpu"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"iPhone OS")
|
"iPhone OS")
|
||||||
|
@ -2426,13 +2432,8 @@ info() {
|
||||||
# $1 is the subtitle
|
# $1 is the subtitle
|
||||||
subtitle="$1"
|
subtitle="$1"
|
||||||
|
|
||||||
# Use cache if it exists
|
# Call the function.
|
||||||
if [[ -f "${cache_dir}/neofetch/${2}" ]]; then
|
"get_${2:-$1}" 2>/dev/null
|
||||||
source "${cache_dir}/neofetch/${2}"
|
|
||||||
else
|
|
||||||
# Call the function.
|
|
||||||
"get_${2:-$1}" 2>/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update the variable
|
# Update the variable
|
||||||
output="${2:-$1}"
|
output="${2:-$1}"
|
||||||
|
|
Loading…
Reference in a new issue