# AX-ZSH: Alex' Modular ZSH Configuration
-# neofetch.ax-io: Show neofetch(1) system information.
+# neofetch.ax-io: Show fastfetch(1) [preferred] or neofetch(1) system information.
-# Make sure that "neofetch(1)" is installed.
-(( $+commands[neofetch] )) || return 1
+# Make sure that fastfetch(1) or neofetch(1) is installed.
+(( $+commands[fastfetch] )) || (( $+commands[neofetch] )) || return 1
# Don't run this plugin on "check-plugins"!
[[ -z "$AXZSH_PLUGIN_CHECK" ]] || return 0
# Check if neofetch(1) infos have been shown during last 60 minutes, and if so,
# don't show them now but return.
-[[ -z `find "$XDG_CACHE_HOME/axzsh_last_neofetch" -mmin -60 2>/dev/null` ]] || return 0
+[[ -z $(find "$XDG_CACHE_HOME/axzsh_last_neofetch" -mmin -60 2>/dev/null) ]] || return 0
-neofetch \
- --color_blocks off \
- --disable packages \
- --shell_path on \
- --underline_char '~'
+if (( $+commands[fastfetch] )); then
+ fastfetch
+elif (( $+commands[neofetch] )); then
+ neofetch
+else
+ return 0
+fi
# Wtite "stamp" file.
-[[ -w ~/ ]] && touch "$XDG_CACHE_HOME/axzsh_last_neofetch"
+[[ -w "$XDG_CACHE_HOME" ]] && touch "$XDG_CACHE_HOME/axzsh_last_neofetch"