feat: update SSH login retrieval in hello.py and improve logo display logic in functions.py
Some checks failed
Nix Format Check / check-format (push) Failing after 37s

This commit is contained in:
2025-03-10 19:13:21 +01:00
parent 3e9e83e25d
commit 7afd1f0bca
2 changed files with 21 additions and 19 deletions

View File

@ -56,12 +56,7 @@ def logo(continue_after=False):
"""Display the dotfiles logo"""
try:
# Try to read logo file first for backward compatibility
logo_path = f"{os.environ.get('DOTFILES_PATH', os.path.expanduser('~/.dotfiles'))}/bin/resources/logo.txt"
if os.path.exists(logo_path):
with open(logo_path, "r") as f:
logo_text = f.read()
print(logo_text)
elif pyfiglet:
if pyfiglet:
# Generate ASCII art with pyfiglet and rainbow colors
ascii_art = pyfiglet.figlet_format("Menno's Dotfiles", font='slant')
print("\n") # Add some space before the logo
@ -74,11 +69,9 @@ def logo(continue_after=False):
# Add a little variation to each line
print(_rainbow_color(line, offset=random_offset + line_offset))
line_offset += 0.1
print("\n") # Add some space after the logo
else:
# Fallback if pyfiglet is not available
printfe("yellow", "\n\n *** Menno's Dotfiles ***\n\n")
printfe("yellow", "\n *** Menno's Dotfiles ***\n")
printfe("cyan", " Note: Install pyfiglet for better logo display")
printfe("cyan", " (pip install pyfiglet)\n")