Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
639537ae
Commit
639537ae
authored
Dec 12, 2016
by
Dylan Araps
Committed by
GitHub
Dec 12, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #518 from dylanaraps/cache3
Cache: Simplify caching
parents
696fc036
d08fdbf0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
neofetch
neofetch
+6
-5
No files found.
neofetch
View file @
639537ae
...
@@ -976,10 +976,16 @@ get_gpu() {
...
@@ -976,10 +976,16 @@ get_gpu() {
;;
;;
"Mac OS X"
)
"Mac OS X"
)
if
[[
-f
"
${
cache_dir
}
/neofetch/gpu"
]]
;
then
source
"
${
cache_dir
}
/neofetch/gpu"
else
gpu
=
"
$(
system_profiler SPDisplaysDataType |
awk
-F
': '
'/^\ *Chipset Model:/ {printf $2 ", "}'
)
"
gpu
=
"
$(
system_profiler SPDisplaysDataType |
awk
-F
': '
'/^\ *Chipset Model:/ {printf $2 ", "}'
)
"
gpu
=
"
${
gpu
//
'/ $'
}
"
gpu
=
"
${
gpu
//
'/ $'
}
"
gpu
=
"
${
gpu
%,*
}
"
gpu
=
"
${
gpu
%,*
}
"
cache
"gpu"
"
$gpu
"
cache
"gpu"
"
$gpu
"
fi
;;
;;
"iPhone OS"
)
"iPhone OS"
)
...
@@ -2426,13 +2432,8 @@ info() {
...
@@ -2426,13 +2432,8 @@ info() {
#
$1
is the subtitle
#
$1
is the subtitle
subtitle="
$1
"
subtitle="
$1
"
# Use cache if it exists
if [[ -f "
${
cache_dir
}
/neofetch/
${
2
}
" ]]; then
source "
${
cache_dir
}
/neofetch/
${
2
}
"
else
# Call the function.
# Call the function.
"
get_
${
2
:-
$1
}
" 2>/dev/null
"
get_
${
2
:-
$1
}
" 2>/dev/null
fi
# Update the variable
# Update the variable
output="
${
2
:-
$1
}
"
output="
${
2
:-
$1
}
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment