From 262ba9d457b462ce265a31ee85563c9d8483684f Mon Sep 17 00:00:00 2001 From: theMackabu Date: Sun, 13 Jul 2025 22:35:30 +0000 Subject: [PATCH] feat: add sim-hell script and update README with clickable links --- README.md | 6 +++--- assets/banner.jpg | 0 bin/sim-hell | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 file(s) changed, 84 insertion(s)(+), 3 deletion(s)(-) diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ ## Shell Configuration -- `.zshrc`: Main Zsh configuration -- `.zprofile`: Zsh profile settings -- `.tishrc`: [Tish](https://github.com/theMackabu/tish) shell configuration +- [`.zshrc`](.zshrc/): Main Zsh configuration +- [`.zprofile`](.zprofile/): Zsh profile settings +- [`.tishrc`](.tishrc/): [Tish](https://github.com/theMackabu/tish) shell configuration ## Installation diff --git a/assets/banner.jpg b/assets/banner.jpg new file mode 100644 --- /dev/null +++ b/assets/banner.jpg diff --git a/bin/sim-hell b/bin/sim-hell new file mode 100644 --- /dev/null +++ b/bin/sim-hell @@ -0,0 +1,81 @@ +#!/bin/bash + +RED='\033[0;31m' +BRIGHT_RED='\033[1;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +WHITE='\033[1;37m' +NC='\033[0m' + +clear +tput civis + +show_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=0 +counter=$start_time +dot_position=0 +direction=1 +frame_count=0 + +while 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)) +done + +tput cnorm +echo "" +echo "Simulation interrupted. Press Ctrl+C to exit..." \ No newline at end of file -- tangled.sh