constants.py 564 B

123456789101112131415161718192021222324252627282930
  1. import os
  2. from pathlib import Path
  3. CONFIG_PATH = Path.home() / '.config/hyfetch.json'
  4. VERSION = '1.0.7'
  5. # Global color mode default to 8-bit for compatibility
  6. COLOR_MODE = '8bit'
  7. # Obtain terminal size
  8. try:
  9. TERM_LEN = os.get_terminal_size().columns
  10. except Exception:
  11. TERM_LEN = 40
  12. TEST_ASCII = r"""
  13. |\___/|
  14. ) (
  15. =\ /=
  16. )===(
  17. / \
  18. | |
  19. / {txt} \
  20. \ /
  21. _/\_ _/_/\_
  22. | |( ( | |
  23. | | ) ) | |
  24. | |(_( | |""".strip('\n')
  25. TEST_ASCII_WIDTH = max(len(line) for line in TEST_ASCII.split('\n'))