diff --git a/plugins.d/antibody.sh b/plugins.d/antibody.sh index 71ebf4b..22e2d1b 100755 --- a/plugins.d/antibody.sh +++ b/plugins.d/antibody.sh @@ -15,8 +15,9 @@ display_info=true # Also add package for prevent to update whitout pin it. declare -a do_not_update=('') -# No distract mode (no user interaction)(Casks with 'latest' version number won't be updated) -no_distract=false +# No distract mode (no user interaction) +[[ $@ =~ "--nodistract" ]] && no_distract=true || no_distract=false + # ############################################################################################### # @@ -26,6 +27,15 @@ no_distract=false # ############################################################################################### +italic="\033[3m" +underline="\033[4m" +ita_under="\033[3;4m" +bgd="\033[1;4;31m" +red="\033[1;31m" +bold="\033[1m" +box="\033[1;41m" +reset="\033[0m" + notification() { sound="Basso" title="Antibody" @@ -42,14 +52,12 @@ notification() { } -if [[ $1 == "--nodistract" ]]; then - no_distract=true -fi - -echo -e "\033[1m🙏 Antibody \033[0m" -echo "" - antibody_folder=$(antibody home) +antibody_version=$(antibody -v 2>&1 | awk '{print $3}') + +echo -e "${bold}🙏 Antibody ${reset}\n" + +echo -e "Current ${underline}Antibody${reset} version: $antibody_version\n" update=$(antibody update 2>&1) @@ -57,7 +65,7 @@ installed=$(echo "$update" | grep "updating") updated=$(echo "$update" | grep "updated") if [ -n "$installed" ]; then - echo -e "\033[4mAntibody modules installed:\033[0m" + echo -e "${underline}Antibody modules installed:${reset}" #echo "$installed" IFS=$'\n' @@ -66,16 +74,18 @@ if [ -n "$installed" ]; then do url=$(echo "$i" | awk '{print $3}') module=$(echo "$i" | awk -F "/" '{print $NF}') - echo -e "\033[1m$module\033[0m ($url)" + echo -e "${bold}$module${reset} ($url)" done echo "" echo "Modules are installed in $antibody_folder folder." else - echo -e "\033[4mNo Antibody modules installed.\033[0m" + echo -e "${underline}No Antibody modules installed.${reset}" fi <