Something went wrong. Try again.
my dotfiles
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081#!/bin/bashRED='\033[0;31m'BRIGHT_RED='\033[1;31m'GREEN='\033[0;32m'YELLOW='\033[1;33m'WHITE='\033[1;37m'NC='\033[0m'cleartput civisshow_boot_message() { local status="$1" local color="$2" local message="$3" local time_info="$4" printf "[%b%s%b] %s" "$color" "$status" "$NC" "$message" if [ -n "$time_info" ]; then printf " %s" "$time_info" fi printf "\n"}update_time_display() { local minutes=$1 local seconds=$2 local dot_pattern=$3 tput cuu1 tput el printf "[%b%s%b] A start job is running for Wait for Network to be Configured (%dm %ds / no limit)\n" \ "$RED" "$dot_pattern" "$NC" "$minutes" "$seconds"}create_dot_pattern() { local pos=$1 case $pos in 0) printf "%b*%b*%b* " "$RED" "$BRIGHT_RED" "$RED" ;; 1) printf "%b *%b*%b* " "$RED" "$BRIGHT_RED" "$RED" ;; 2) printf "%b *%b*%b*" "$RED" "$BRIGHT_RED" "$RED" ;; 3) printf "%b *%b*%b* " "$RED" "$BRIGHT_RED" "$RED" ;; 4) printf "%b*%b*%b* " "$RED" "$BRIGHT_RED" "$RED" ;; esac}start_time=0counter=$start_timedot_position=0direction=1frame_count=0while true; do sleep 0.5 if [ $((frame_count % 2)) -eq 0 ]; then counter=$((counter + 1)) fi minutes=$((counter / 60)) seconds=$((counter % 60)) current_pattern=$(create_dot_pattern $dot_position) update_time_display $minutes $seconds "$current_pattern" dot_position=$((dot_position + direction)) if [ $dot_position -eq 2 ]; then direction=-1 elif [ $dot_position -eq 0 ]; then direction=1 fi frame_count=$((frame_count + 1))donetput cnormecho ""echo "Simulation interrupted. Press Ctrl+C to exit..."