Some checks failed
Nix Format Check / check-format (push) Failing after 37s
31 lines
768 B
Python
Executable File
31 lines
768 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import sys
|
|
|
|
# Import helper functions
|
|
sys.path.append(os.path.join(os.path.expanduser("~/.dotfiles"), "bin"))
|
|
from helpers.functions import printfe, logo, _rainbow_color
|
|
|
|
def welcome():
|
|
"""Display welcome message with hostname and username"""
|
|
print()
|
|
|
|
# Get hostname and username
|
|
hostname = os.uname().nodename
|
|
username = os.environ.get("USER", os.environ.get("USERNAME", "user"))
|
|
|
|
print("\033[36mYou're logged in on [", end="")
|
|
print(_rainbow_color(hostname), end="")
|
|
print("\033[36m] as [", end="")
|
|
print(_rainbow_color(username), end="")
|
|
print("\033[36m]\033[0m")
|
|
|
|
def main():
|
|
logo(continue_after=True)
|
|
welcome()
|
|
return 0
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|