Skip to content

Commit

Permalink
[PR] dylanaraps/neofetch#1891 from kidonng - Respect if it exists
Browse files Browse the repository at this point in the history
Upstream PR: dylanaraps/neofetch#1891
Thanks to @kidonng

Co-authored-by: Kid <[email protected]>
  • Loading branch information
hykilpikonna and kidonng committed Aug 11, 2022
2 parents 5b307d5 + 765b036 commit e184c99
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -5205,10 +5205,11 @@ cache() {
}

get_cache_dir() {
case $os in
"Mac OS X"|"macOS") cache_dir="/Library/Caches" ;;
*) cache_dir="/tmp" ;;
esac
if [[ "$TMPDIR" ]]; then
cache_dir="$TMPDIR"
else
cache_dir="/tmp"
fi
}

kde_config_dir() {
Expand Down Expand Up @@ -5763,8 +5764,7 @@ get_args() {
"--gap") gap="$2" ;;
"--clean")
[[ -d "$thumbnail_dir" ]] && rm -rf "$thumbnail_dir"
rm -rf "/Library/Caches/neofetch/"
rm -rf "/tmp/neofetch/"
rm -rf "$cache_dir/neofetch/"
exit
;;

Expand Down Expand Up @@ -12971,6 +12971,7 @@ EOF
main() {
cache_uname
get_os
get_cache_dir

# Load default config.
eval "$config"
Expand All @@ -12993,7 +12994,6 @@ main() {
}

image_backend
get_cache_dir
old_functions
print_info
dynamic_prompt
Expand Down

0 comments on commit e184c99

Please sign in to comment.