X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ax-zsh.git;a=blobdiff_plain;f=plugins%2Fneofetch%2Fneofetch.ax-io;fp=plugins%2Fneofetch%2Fneofetch.ax-io;h=7a37f6ec12bff7d1b3ed50f37f3a7cd40e7b2970;hp=ed4f197bed9204da91269f6ae8d965144405ae39;hb=d1856e809a68c5772970def225ce3dcbdb7e4883;hpb=d14d37813fd37ed5ca24f6aa23e370005bdf2dce diff --git a/plugins/neofetch/neofetch.ax-io b/plugins/neofetch/neofetch.ax-io index ed4f197..7a37f6e 100644 --- a/plugins/neofetch/neofetch.ax-io +++ b/plugins/neofetch/neofetch.ax-io @@ -7,17 +7,6 @@ # Don't run this plugin on "check-plugins"! [[ -z "$AXZSH_PLUGIN_CHECK" ]] || return 0 -axzsh_neofetch() { - if (( $+commands[fastfetch] )); then - fastfetch - elif (( $+commands[neofetch] )); then - neofetch - else - echo "Neither fastfetch(1) nor neofetch(1) was found!" >&2 - return 1 - fi -} - # Don't show any info when ~/.hushlogin exists ... [[ -r ~/.hushlogin ]] && return 0 @@ -25,7 +14,13 @@ axzsh_neofetch() { # don't show them now but return. [[ -z $(find "$XDG_CACHE_HOME/axzsh_last_neofetch" -mmin -60 2>/dev/null) ]] || return 0 -axzsh_neofetch +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"