Rainbow header that works
Modified: February 14, 2026 7:58 PM Created: September 17, 2025 3:27 PM Master Type: Notes Hide: No Starred: No Status: Unassigned
#!/bin/bash
set -euo pipefail
# ---------------------------
# CONFIG
# ---------------------------
SCRIPT_FOLDER="$HOME/Scripts"
# ANSI colors
GREEN="\033[1;32m"
YELLOW="\033[1;33m"
RED="\033[1;31m"
CYAN="\033[1;36m"
MAGENTA="\033[1;35m"
WHITE="\033[1;37m"
NC="\033[0m"
# ---------------------------
# Fun tips for spinner
# ---------------------------
TIPS=(
"๐ธ Coffee levels low. Operator alert recommended."
"๐พ Feline observers online. Spreadsheet approval pending."
"โณ Patience required. Temporal flux minimal but present."
"โจ Archive integrity at maximum sparkle output."
"๐ Hang tight. Waveforms nominal, operator stable."
"๐ฎ Processing magicโฆ flux capacitors at 72%."
"๐พ Backup engaged. Future-you will report success."
"๐ฆ Dino-level patience required. Fossil signals detected."
"๐ Logging notesโฆ head trauma risk minimal."
"๐จ Color calibration active. Vividness at 97%."
"๐ Retro-futurist energy loadingโฆ warp cores stabilizing."
"๐ Sorting historyโฆ one artifact at a time."
"๐ก Bright idea detected. Routing to mainframe."
"๐ต๏ธโโ๏ธ Inspecting dataโฆ anomaly detection online."
"โก Almost doneโฆ final sequences initializing."
"๐ Pixels aligningโฆ cosmic synchronization complete."
"๐ผ Another artifact scannedโฆ victory protocol engaged."
"โ Caffeine levels nominal. Moodlet bonus active."
"๐ฑ Cat consensus reached: digitization approved."
"๐ Magic signal detected between clicks."
"๐ง Photoshop action deployedโฆ feline AI supervising."
"๐ช Archive orbit engaged. All systems nominal."
"๐ฆ Boxes secured. Tagging protocol active."
"๐ Zoom sequence complete. Details optimized."
"๐งฉ Archival assembly progressingโฆ module stability 100%."
"๐ถ Quiet beats enabled. Workflow efficiency +5."
"๐งต Threads of history digitally stitched. No tears."
"๐ฟ Operator breathing stable. Archive thanks you."
"๐ Metadata wizardry detected. Spellcasting active."
"๐ Precision calibration active. Pixels aligned."
"๐ Minor victories logged. Accumulate morale boost."
"๐ Tools online. Operational magic detected."
"๐ฅฝ Safety protocol engaged. Pixel hazards minimal."
"๐ง Neural networks engaged. Cognitive load optimal."
"๐ธ Workspace aesthetic nominal. Operator satisfaction +2."
"๐ Archival protection active. Security protocols online."
"๐ Data love flowing. Spreadsheet integrity stable."
"๐ Every scan secured. Gift transmission confirmed."
"๐ธ Workflow efficiency approaching UFO-class levels."
"๐ Future researchers will send commendations."
"๐ค Dark mode active. Moodlet bonus applied."
"๐ข Digitization rollercoaster online. Hold on."
"๐ Unlocking archive secretsโฆ sequence successful."
"๐ Sunlight optional. Brilliance levels sufficient."
"๐ฆ Wisdom protocol engaged. Archive guidance online."
"๐ Ding! Process complete. All files secured."
"๐ Catalogue loggingโฆ poetry metrics stable."
"๐ Star alignment nominal. TIFFs incoming."
"๐ฅ Batch celebration protocol activated."
"๐ซ Sparkle levels responsibly maintained."
"๐ Drawing outside lines optional. Risk: chaos."
"๐ History grows. Incremental progress confirmed."
"๐ฏ Focus modules online. Task success probability +12%."
"๐ช Creativity levels soaring. Order stability maintained."
"๐ฐ Temporal navigation complete. Negative secured."
"๐ฅ Specialist achievement unlocked. Recognition granted."
"๐ฅ Pixel storm incomingโฆ brace your coffee."
"๐ธ Alien observer: data integrity confirmed."
"๐ก Signal booster online. Archive ping successful."
"โก Capacitors charged. Sparks may fly."
"๐ฅ Monitor flicker detectedโฆ just aesthetics."
"๐ช Planetary alignment favors new TIFF uploads."
"๐งญ Navigation console active. Metadata coordinates set."
"๐ Dial knobs clockwiseโฆ efficiency +7%."
"๐ Emergency toolkit online. Use responsibly."
"๐ฃ Minor glitch detectedโฆ ignore at your own risk."
"๐ Starfield projection engaged. Moodlet: inspired."
"๐ฐ Satellite ping received. Archive operational."
"๐น Joystick optional. Cursor stabilized."
"๐ฑ Mouse calibration nominal. Click at will."
"๐ Power cells charged. Operator alertness advised."
"๐พ Mainframe memory banks hummingโฆ hum soothing."
"๐ Digital quills ready. Logging commencing."
"๐ง Neural interface active. Thought-stream synced."
"๐งต Threads of data: minor tangles detected, fixing."
"๐ฆ Cargo bay full. Extra pixels secured in storage."
"๐ฏ Target archive locked. Precision protocols online."
"๐ซ Photon beams aligned. TIFFs incoming."
"๐ Retrofuturistic fireworks queued. Stand by."
"๐ Data integrity: 100% confirmed. Spreadsheet victory."
"๐ฟ Oxygen levels normal. Operator can breathe easy."
"๐ถ Retro synth ambient soundtrack active."
"๐ Message to future researchers queued."
"๐ธ UFO-level efficiency confirmed. No abducted pixels."
"๐ Archive alert: batch complete. Ding!"
"๐ช Orbital sequence nominal. Archive intact."
"โก Voltage spike detectedโฆ aesthetic only."
"๐ Security protocols online. Data safe."
"๐ฅ Minor cosmic glitchโฆ ignore unless dramatic."
"๐ฐ Incoming archive signalโฆ all channels green."
"๐พ Data replication in progress. Quantum stable."
"๐ช Orbital recalibration complete. Gravity nominal."
"๐ง Repair drones deployed. No pixel casualties."
"โก Warning: minor energy fluctuation detected."
"๐ฅ Monitor refresh sequence complete. Flicker nominal."
"๐ก Receiving transmissions from future researchers."
"๐ Spark sequence queued. Visuals optional, morale +5."
"๐งญ Metadata compass active. Coordinates locked."
"๐ Toolkit ready. Operator skill level: expert."
"๐ฃ Simulation: cosmic glitch incomingโฆ ignore if bored."
"๐ Archive cosmos scan: integrity 100%."
"๐น Virtual joystick activated. Cursor responsive."
"๐ Energy dial rotation nominal. Efficiency +3%."
"๐ Log sync complete. Notes secured."
"๐ง Cognitive systems online. Neural flux optimal."
"๐ฆ Cargo bay status: fully packed. Pixels secure."
"๐ Drawing module online. Chaos optional."
"๐ถ Ambient synth engaged. Moodlet: focused."
"๐ซ Photon alignment: TIFFs incoming. Brace for brilliance."
"๐ Alert: batch sequence completed. Ding ding!"
"๐ค Dark mode confirmed. Eye strain minimized."
"๐ Star projection engaged. Cosmic bonuses applied."
)
# ---------------------------
# Captain Whiskers lines
# ---------------------------
CW_LINES=(
# --- Mission Logs / Status Reports (1โ30) ---
"โโโ LOG: Negative 01 scanned."
"โโโ LOG: Negative 02 scanned."
"โโโ LOG: Negative 03 scanned."
"โโโ SYSTEM: Box 07 sealed. Captain Whiskers approves."
"โโโ SYSTEM: Box 08 sealed. Pawprint logged."
"โโโ DATASTREAM: TIFF conversion in progress."
"โโโ DATASTREAM: JPG generation queued."
"โโโ ALERT: Paperclip count exceeds threshold."
"โโโ ARCHIVE: Folder 12 scanned."
"โโโ ARCHIVE: Folder 23 scanned. Paw prints logged."
"โโโ LOG: Batch 5 complete. Sensors nominal."
"โโโ LOG: Batch 6 complete. All items accounted for."
"โโโ SYSTEM: Power levels stable."
"โโโ DATASTREAM: Scanning metadata."
"โโโ LOG: Negative 42 successfully scanned."
"โโโ ALERT: Dust detected on plate. Clean immediately."
"โโโ LOG: Box 21 relocated to Zone C."
"โโโ SYSTEM: Archive temperature nominal."
"โโโ LOG: Batch 7 initiated. Captain Whiskers supervising."
"โโโ LOG: Batch 8 initiated. Pawprints logged."
"โโโ ALERT: Misfiled negative detected."
"โโโ DATASTREAM: Checking file integrity."
"โโโ SYSTEM: Laser calibration complete."
"โโโ LOG: Disk space OK. Ready for next phase."
"โโโ LOG: Folder 42 verified."
"โโโ ALERT: Minor pixel misalignment."
"โโโ ARCHIVE: Volume 3 scanned. Captain Whiskers approves."
"โโโ LOG: Batch 9 complete."
"โโโ LOG: Phase 1 prep done."
"โโโ SYSTEM: Environment stable."
# --- Captain Whiskersโ Personal Commentary (31โ60) ---
"โโโ CW: Patience, young human."
"โโโ CW: Coffee detected. Good choice."
"โโโ CW: Remember the metadata!"
"โโโ CW: Another JPG joins the fleet."
"โโโ CW: Cute pawprint incoming."
"โโโ CW: Files are stacking nicely."
"โโโ CW: Inspect each box carefully."
"โโโ CW: Archive day is cosmic day."
"โโโ CW: Logging personal notes."
"โโโ CW: Another artifact, another victory."
"โโโ CW: Reminder: hydrate human."
"โโโ CW: Pawprint detected in unexpected location."
"โโโ CW: Tiny stars align on monitor."
"โโโ CW: Smooth scrolling. Good job."
"โโโ CW: Captain Whiskers approves this crop."
"โโโ CW: Another metadata packet secured."
"โโโ CW: Paw prints are being tracked."
"โโโ CW: Warp drive nominal."
"โโโ CW: Archive sensors stable."
"โโโ CW: Files look neat."
"โโโ CW: Inspecting negatives carefully."
"โโโ CW: Cosmic alignment achieved."
"โโโ CW: Minor flicker detected. All good."
"โโโ CW: Pawprint collected."
"โโโ CW: Files orbiting nicely."
"โโโ CW: Metadata logs complete."
"โโโ CW: Captain Whiskers demands more pawprints."
"โโโ CW: All clear in Sector 7."
"โโโ CW: Archive 1989 reminiscence."
"โโโ CW: Another warp bubble stabilized."
# --- Accidental Feedback / Spaceship Signals (61โ80) ---
"โโโ SHIP1: Warp coordinates misaligned."
"โโโ SHIP2: Thrusters nominal."
"โโโ SIGNAL: Glitch detected. Attempting repair."
"โโโ COMM: Data packet #42 floating in space."
"โโโ ALERT: Pawprint anomaly in Sector 5."
"โโโ SHIP3: Minor collision avoided."
"โโโ SIGNAL: Beam fluctuation detected."
"โโโ COMM: Cosmic dust detected."
"โโโ SHIP1: Scanning nebula."
"โโโ SIGNAL: Unexpected reflection detected."
"โโโ ALERT: Micro starfield disturbance."
"โโโ SHIP2: Navigation nominal."
"โโโ COMM: Telemetry glitch detected."
"โโโ ALERT: Archive sensors flicker."
"โโโ SHIP3: Pawprint beacon active."
"โโโ SIGNAL: Minor interference detected."
"โโโ COMM: Logging anomaly."
"โโโ ALERT: Cosmic rays impacting pixels."
"โโโ SHIP1: Alignment complete."
"โโโ SIGNAL: Minor warp fluctuation detected."
# --- Digitization Mission Tips / Humor (81โ100) ---
"โโโ TIP: Label all boxes. Captain Whiskers insists."
"โโโ TIP: Save often, or face cosmic chaos."
"โโโ CW: Pixels align. Proceed with caution."
"โโโ CW: Inspect every negative, even the tiny ones."
"โโโ TIP: Coffee improves scanning efficiency."
"โโโ CW: Every pawprint counts."
"โโโ TIP: Organize by date and type."
"โโโ CW: Keep your cat nearby for supervision."
"โโโ TIP: Small victories accumulate."
"โโโ CW: Cosmic sparkle in archive achieved."
"โโโ TIP: Double-check metadata before export."
"โโโ CW: Captain Whiskers recommends napping."
"โโโ TIP: Rotate boxes to avoid dust accumulation."
"โโโ CW: Archive sensors nominal."
"โโโ TIP: Use proper lighting when scanning."
"โโโ CW: Pawprint patrol active."
"โโโ TIP: Every scan is a gift to the future."
"โโโ CW: Cosmic alignment nominal."
"โโโ TIP: Enjoy the workflow, young specialist."
"โโโ CW: Captain Whiskers approves the export."
)
# ---------------------------
# Helper: print centered text
# ---------------------------
print_centered() {
local color="$1"
local text="$2"
local width="$3"
local symbols=("*" "โข" "+" "ยบ" "." "โฆ" " ")
[ ${#text} -gt $width ] && text="${text:0:$width}"
text="${text//%/%%}"
local pad_left=$(( (width - ${#text}) / 2 ))
local pad_right=$(( width - ${#text} - pad_left ))
local left_pad="" right_pad=""
for ((i=0;i<pad_left;i++)); do
if (( RANDOM % 12 < 9 )); then left_pad+=" "; else left_pad+="${symbols[$((RANDOM % ${#symbols[@]}))]}"; fi
done
for ((i=0;i<pad_right;i++)); do
if (( RANDOM % 20 < 16 )); then right_pad+=" "; else right_pad+="${symbols[$((RANDOM % ${#symbols[@]}))]}"; fi
done
left_pad="${left_pad//%/%%}"
right_pad="${right_pad//%/%%}"
printf "%bโ%s%s%sโ%b\n" "$color" "$left_pad" "$text" "$right_pad" "$NC"
}
# ---------------------------
# Shimmering stars generator (sparser)
# ---------------------------
generate_stars() {
local count=$1
local output=""
local symbols=("*" "โข" "+" "ยบ" "." "โฆ" " ")
for i in $(seq 1 $count); do
if (( RANDOM % 3 < 2 )); then
output+=" "
else
output+="${symbols[$((RANDOM % ${#symbols[@]}))]}"
fi
done
echo "$output"
}
# ---------------------------
# Spinner function (with rotating tips)
# ---------------------------
spinner() {
local pid=$1
local min_time=${2:-2}
local start_time=$(date +%s)
local delay=0.15
local spinstr='|/-\'
local sparkles=("โจ" "๐" "๐ซ" "โญ๏ธ" "๐พ" "โฆ" "ยบ" "โข")
local tip_interval_secs=1
local last_tip_time=$(date +%s)
local tip="${TIPS[$((RANDOM % ${#TIPS[@]}))]}"
local i=0
local max_len=0
for t in "${TIPS[@]}"; do (( ${#t} > max_len )) && max_len=${#t}; done
while kill -0 "$pid" 2>/dev/null; do
local now=$(date +%s)
if (( now - last_tip_time >= tip_interval_secs )); then
tip="${TIPS[$((RANDOM % ${#TIPS[@]}))]}"
last_tip_time=$now
fi
local idx=$(( i % 4 ))
local spin_char="${spinstr:$idx:1}"
local sparkle="${sparkles[$((RANDOM % ${#sparkles[@]}))]}"
printf "\r${CYAN}Working... %-*s %s${NC}" "$max_len" "$tip" "$spin_char$sparkle"
sleep $delay
((i++))
done
local elapsed=$(( $(date +%s) - start_time ))
while [ $elapsed -lt $min_time ]; do
local now=$(date +%s)
if (( now - last_tip_time >= tip_interval_secs )); then
tip="${TIPS[$((RANDOM % ${#TIPS[@]}))]}"
last_tip_time=$now
fi
local idx=$(( i % 4 ))
local spin_char="${spinstr:$idx:1}"
local sparkle="${sparkles[$((RANDOM % ${#sparkles[@]}))]}"
printf "\r${CYAN}Working... %-*s %s${NC}" "$max_len" "$tip" "$spin_char$sparkle"
sleep $delay
((i++))
elapsed=$(( $(date +%s) - start_time ))
done
printf "\r${GREEN}Working... %-*s โ
Done!${NC}\n" "$max_len" "$tip"
}
# ---------------------------
# Detect candidate volumes
# ---------------------------
detect_volume() {
local candidateVolumes=()
for vol in /Volumes/*; do
[ -f "$vol/config.sh" ] && candidateVolumes+=("$vol")
done
if [ ${#candidateVolumes[@]} -eq 0 ]; then
echo -e "${RED}No volume with config.sh found.${NC}"
exit 1
elif [ ${#candidateVolumes[@]} -eq 1 ]; then
TOP_FOLDER="${candidateVolumes[0]}"
echo -e "${GREEN}Detected volume: $TOP_FOLDER${NC}"
else
echo -e "${YELLOW}Multiple candidate volumes detected:${NC}"
select TOP_FOLDER in "${candidateVolumes[@]}"; do
[ -n "$TOP_FOLDER" ] && break
echo -e "${RED}Invalid selection.${NC}"
done
fi
}
print_centered_rainbow() {
local text="$1"
local width="$2"
local symbols=("*" "โข" "+" "ยบ" "." "โฆ" " ")
# Trim if too long
[ ${#text} -gt $width ] && text="${text:0:$width}"
# Padding calculations
local pad_left=$(( (width - ${#text}) / 2 ))
local pad_right=$(( width - ${#text} - pad_left ))
local left_pad="" right_pad=""
for ((i=0;i<pad_left;i++)); do
if (( RANDOM % 12 < 9 )); then left_pad+=" "; else left_pad+="${symbols[$((RANDOM % ${#symbols[@]}))]}"; fi
done
for ((i=0;i<pad_right;i++)); do
if (( RANDOM % 20 < 16 )); then right_pad+=" "; else right_pad+="${symbols[$((RANDOM % ${#symbols[@]}))]}"; fi
done
# Side borders
printf "%bโ" "$GREEN"
# Print left padding
printf "%s" "$left_pad"
# Rainbow text
for ((i=0; i<${#text}; i++)); do
local hue=$(( i * 360 / ${#text} ))
local color_code="\033[38;5;$(hue_to_ansi $hue)m"
printf "${color_code}%s${NC}" "${text:i:1}"
done
# Print right padding
printf "%s" "$right_pad"
# Close right border
printf "%bโ%b\n" "$GREEN" "$NC"
}
# ---------------------------
# Draw menu
# ---------------------------
draw_menu() {
local ascii_banner_lines=(
"โโโ โโโโโโโโโโ โโโโโโโ โโโโโโโโโโโ โโโ"
"โโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโ โโโ"
"โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ"
"โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ"
"โโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ"
"โโโ โโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ โโโ"
)
local max_len=0
for line in "${ascii_banner_lines[@]}"; do
(( ${#line} > max_len )) && max_len=${#line}
done
local border_width=$(( max_len + 4 ))
local inner_width=$(( border_width - 2 ))
local header="Detected volume: ${TOP_FOLDER:-None}"
local left_extra="โโโ "
local top_content="$left_extra$header"
local top_len=${#top_content}
local fill_len=$(( border_width - top_len - 2 ))
(( fill_len < 0 )) && fill_len=0
printf "${GREEN}โ%s%sโ${NC}\n" "$top_content" "$(printf 'โ%.0s' $(seq 1 $fill_len))"
# Convert hue (0โ360) to ANSI 256-color code
hue_to_ansi() {
local hue=$1
local r g b
if [ $hue -lt 60 ]; then r=5; g=$((hue*5/60)); b=0
elif [ $hue -lt 120 ]; then r=$((5-(hue-60)*5/60)); g=5; b=0
elif [ $hue -lt 180 ]; then r=0; g=5; b=$(((hue-120)*5/60))
elif [ $hue -lt 240 ]; then r=0; g=$((5-(hue-180)*5/60)); b=5
elif [ $hue -lt 300 ]; then r=$(((hue-240)*5/60)); g=0; b=5
else r=5; g=0; b=$((5-(hue-300)*5/60)); fi
echo $((16 + 36*r + 6*g + b))
}
for line in "${ascii_banner_lines[@]}"; do
print_centered_rainbow "$line" "$inner_width"
done
for i in $(seq 1 $((1 + RANDOM % 2))); do
local line="${CW_LINES[$((RANDOM % ${#CW_LINES[@]}))]}"
print_centered "$MAGENTA" "$line" "$inner_width"
done
printf "${GREEN}โ %sโฃ${NC}\n" "$(printf 'โ%.0s' $(seq 1 $inner_width))"
# ---- UPDATED MENU ----
local options=(
"1 โ Phase 1, Crop and Adjust"
"2 โ Phase 2, Convert and Export"
"3 โ Phase 3, Sort and Filter"
"4 โ Crop and Convert Prints"
"5 โ Create New Volume"
"Q โ Quit"
)
for opt in "${options[@]}"; do
local color="$YELLOW"
[[ "$opt" =~ ^Q ]] && color="$RED"
print_centered "$color" "$opt" "$inner_width"
done
printf "${GREEN}โ %sโฃ${NC}\n" "$(printf 'โ%.0s' $(seq 1 $inner_width))"
local archive_text="Hooks ยฉ 1907"
local stars_total=$(( inner_width - ${#archive_text} - 2 ))
local left_stars_count=$(( stars_total / 2 ))
local right_stars_count=$(( stars_total - left_stars_count ))
local left_stars=$(generate_stars $left_stars_count)
local right_stars=$(generate_stars $right_stars_count)
print_centered "$CYAN" "$left_stars $archive_text $right_stars" "$inner_width"
printf "${GREEN}โ%sโ${NC}\n" "$(printf 'โ%.0s' $(seq 1 $inner_width))"
}
# ---------------------------
# Helper: run script with spinner
# ---------------------------
run_with_spinner() {
local script="$1"
local args="${2:-}"
local completion_msg="${3:-Done!}"
bash "$script" $args &
local pid=$!
spinner $pid 2
echo -e "${GREEN}${completion_msg}${NC}"
sleep 1
clear
}
# ---------------------------
# Main loop
# ---------------------------
main_loop() {
detect_volume
while true; do
clear
draw_menu
echo
read -rp "$(printf "${WHITE}Choose an option: ${NC}")" choice
case "$choice" in
1)
run_with_spinner "$SCRIPT_FOLDER/phase1.sh" "$TOP_FOLDER" "โ
Phase 1 complete."
;;
2)
run_with_spinner "$SCRIPT_FOLDER/phase2.sh" "$TOP_FOLDER" "โ
Phase 2 complete."
;;
3)
run_with_spinner "$SCRIPT_FOLDER/phase3.sh" "$TOP_FOLDER" "โ
Phase 3 complete."
;;
4)
echo -e "${CYAN}Starting Phase 1 & 2 combined...${NC}"
# Phase 1 in foreground
bash "$SCRIPT_FOLDER/phase1.sh" "$TOP_FOLDER" &
pid=$!
# Spinner watches PID in background
spinner $pid 2 &
spinner_pid=$!
wait $pid # Wait for Phase 1 to truly finish
kill $spinner_pid 2>/dev/null
echo -e "${GREEN}โ
Phase 1 complete.${NC}"
# Phase 2 in foreground
bash "$SCRIPT_FOLDER/phase2.sh" "$TOP_FOLDER" &
pid=$!
spinner $pid 2 &
spinner_pid=$!
wait $pid
kill $spinner_pid 2>/dev/null
echo -e "${GREEN}โ
Phase 2 complete.${NC}"
sleep 1
clear
;;
5)
read -rp "Enter new volume name: " userVolume
read -rp "Enter enclosure type: " userEnclosure
run_with_spinner "$SCRIPT_FOLDER/newvolume.sh" "$userVolume $userEnclosure $SCRIPT_FOLDER" "โ
New volume created."
;;
Q|q)
echo -e "${RED}Exitingโฆ${NC}"
exit 0
;;
*)
echo "โ ๏ธ Invalid choice."
sleep 1
;;
esac
done
}
# ---------------------------
# Start launcher
# ---------------------------
main_loop