Skip to content

Instantly share code, notes, and snippets.

@intellectronica
Created August 14, 2025 13:11
Show Gist options
  • Save intellectronica/c7208ae22762d299ca6b1abfc81f0c51 to your computer and use it in GitHub Desktop.
Save intellectronica/c7208ae22762d299ca6b1abfc81f0c51 to your computer and use it in GitHub Desktop.
VSCode / GitHub Copilot Chat Agent with GPT-5-mini Banner Script
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "rich>=13.0.0",
# "pyfiglet>=0.9.0",
# ]
# ///
"""Display a full-screen colorful banner that reads "I ❤️ GPT-5-mini".
This script uses `pyfiglet` to render large ASCII text and `rich` to color
and center the output. The small YAML-like header at the top lists the
runtime dependencies for simple tooling that reads a script stanza.
"""
import os
import shutil
import sys
from time import sleep
try:
from pyfiglet import Figlet
from rich.console import Console
from rich.text import Text
except Exception as e:
print("Missing dependency:", e)
print()
print("Install required packages and re-run:")
print(" python3 -m pip install --user rich pyfiglet")
sys.exit(1)
console = Console()
HEART = [
" ❤❤ ❤❤ ",
" ❤❤❤ ❤❤❤ ",
" ❤❤❤❤❤❤❤ ",
" ❤❤❤❤❤ ",
" ❤❤❤ ",
" ❤❤ ",
]
def clear():
os.system("clear")
def render_fullscreen():
# render pieces
fig_I = Figlet(font="slant")
fig_gpt = Figlet(font="big")
fig_I_block = fig_I.renderText("I")
fig_gpt_block = fig_gpt.renderText("GPT-5-mini")
fig_I_lines = fig_I_block.rstrip("\n").splitlines()
fig_gpt_lines = fig_gpt_block.rstrip("\n").splitlines()
heart_lines = HEART
# align heights
left_h = max(len(fig_I_lines), len(heart_lines))
left_block = []
for i in range(left_h):
left_part = fig_I_lines[i] if i < len(fig_I_lines) else " " * (len(fig_I_lines[0]) if fig_I_lines else 0)
heart_part = heart_lines[i] if i < len(heart_lines) else " " * len(heart_lines[0])
# a small gap between I and heart
left_block.append(left_part + " " + heart_part)
# combine left_block and right block vertically: left on top, right below
combined_lines = left_block + [""] + fig_gpt_lines
# compute terminal size
cols, rows = shutil.get_terminal_size()
# center vertically
content_height = len(combined_lines)
pad_top = max((rows - content_height) // 2, 0)
clear()
# print top padding
for _ in range(pad_top):
console.print()
# print each line centered horizontally with coloring
for idx, line in enumerate(combined_lines):
# split left vs right coloring: lines from left_block should color I yellow and heart red
if idx < len(left_block):
# split into I part and heart part by the marker ' '
if " " in line:
i_part, heart_part = line.split(" ", 1)
else:
i_part, heart_part = line, ""
text = Text(i_part, style="bold yellow") + Text(" ") + Text(heart_part, style="bold red")
console.print(text, justify="center")
else:
# GPT-5-mini lines
console.print(Text(line, style="bold cyan"), justify="center")
# keep for a short moment so user sees full-screen banner
try:
# wait for a keypress if possible
console.print()
console.print(Text("Press Ctrl-C to exit or wait 10s...", style="dim"), justify="center")
sleep(10)
except KeyboardInterrupt:
pass
if __name__ == "__main__":
render_fullscreen()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment