Spaces:
Sleeping
Sleeping
File size: 1,536 Bytes
8d9eecc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# display.py
import os
import getpass
import socket
from datetime import datetime
from colors import *
def clear_and_setup():
"""Clear terminal and setup background"""
os.system('clear')
print(BG_BLACK, end='')
print(f"{CYAN}{BOLD}")
print(" ╔═══════════════════════════════════════╗")
print(" ║ Codic ║")
print(" ║ Your Custom Shell ║")
print(" ╚═══════════════════════════════════════╝")
print(f"{RESET}\n")
def get_colored_prompt():
"""Create colorful prompt with current path"""
username = getpass.getuser()
hostname = socket.gethostname()
current_path = os.getcwd()
if len(current_path) > 25:
current_path = "..." + current_path[-22:]
return f"{GREEN}{BOLD}{username}{RESET}@{BLUE}{hostname}{RESET}:{YELLOW}{BOLD}{current_path}{RESET}> AcidopShell$ "
def show_ascii_art():
"""Show cool ASCII art as background"""
art = f"""{BLUE}
⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣿⣿⣿⣿⣿⣶⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀
⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀
⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀
{RESET}"""
print(art)
|