hykilpikonna / hyfetch

🏳️‍🌈 🏳️‍⚧️ Neofetch with LGBTQ+ pride flags!
MIT License
1.3k stars 96 forks source link

TERM environment variable is not respected #347

Open mamccollum opened 1 month ago

mamccollum commented 1 month ago

Describe the bug

On OmniOS (Illumos, and potentially other OS families as well), the TERM environment variable is not respected when running hyfetch.

When setting TERM to xterm-mono, hyfetch still prints colors, which can be potentially dangerous to terminals that do not support colors, whether it be user choice or hardware/software support.

Expected behavior

Hyfetch should not print colors when TERM is set to xterm-mono.

Screenshots

Please include a screenshot of your system information if the specific system environment is relevant to the bug.

image

Config file

Please paste the content of ~/.config/hyfetch.json below:

{
    "preset": "rainbow",
    "mode": "rgb",
    "light_dark": "dark",
    "lightness": 0.65,
    "color_align": {
        "mode": "horizontal",
        "custom_colors": [],
        "fore_back": null
    },
    "backend": "neofetch",
    "args": null,
    "distro": null,
    "pride_month_shown": [],
    "pride_month_disable": false
}

Additional context

System information:

rl@rl:~$ uname -a
SunOS rl 5.11 omnios-r151050-49db1c0a0fe i86pc i386 i86pc

Python version:

rl@rl:~$ python3 -V
Python 3.12.4