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
0674f141
Commit
0674f141
authored
Dec 12, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache: Simplify caching
parent
696fc036
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
neofetch
neofetch
+12
-11
No files found.
neofetch
View file @
0674f141
...
@@ -976,10 +976,16 @@ get_gpu() {
...
@@ -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"
]]
;
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() {
...
@@ -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
}
"
...
...
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