Open RuiNtD opened 1 year ago
I'm realizing that if you did try to run it in WSL, it would just give info on WSL instead of Windows. Maybe you could detect if the location of bash.exe
is either %windir%\system32\bash.exe
or %LocalAppData%\Microsoft\WindowsApps\bash.exe
and search the PATH for a bash.exe
sitting next to git.exe
?
Does scoop install fastfetch
hyfetch -b fastfetch
works for you?
Nope.
> hyfetch -b fastfetch
/bin/bash: line 1: /c/Users/ethan/scoop/apps/python/current/Lib/site-packages/hyfetch/scripts/neowofetch: No such file or directory
Error: Command '[WindowsPath('C:/WINDOWS/system32/bash.exe'), '-c', "'/c/Users/ethan/scoop/apps/python/current/Lib/site-packages/hyfetch/scripts/neowofetch' ascii_distro_name"]' returned non-zero exit status 127.
Traceback (most recent call last):
File "C:\Users\ethan\scoop\apps\python\current\Lib\site-packages\hyfetch\main.py", line 422, in run
asc = get_distro_ascii() if not args.ascii_file else Path(args.ascii_file).read_text("utf-8")
^^^^^^^^^^^^^^^^^^
File "C:\Users\ethan\scoop\apps\python\current\Lib\site-packages\hyfetch\neofetch_util.py", line 317, in get_distro_ascii
det = distro_detector.detect(distro or get_distro_name())
^^^^^^^^^^^^^^^^^
File "C:\Users\ethan\scoop\apps\python\current\Lib\site-packages\hyfetch\neofetch_util.py", line 338, in get_distro_name
return run_neofetch_cmd('ascii_distro_name', True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ethan\scoop\apps\python\current\Lib\site-packages\hyfetch\neofetch_util.py", line 298, in run_neofetch_cmd
return check_output(full_cmd).decode().strip()
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ethan\scoop\apps\python\current\Lib\subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ethan\scoop\apps\python\current\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '[WindowsPath('C:/WINDOWS/system32/bash.exe'), '-c', "'/c/Users/ethan/scoop/apps/python/current/Lib/site-packages/hyfetch/scripts/neowofetch' ascii_distro_name"]' returned non-zero exit status 127.
Strange. Does running fastfetch
directly work?
Yep. I'm pretty sure it's still calling neowofetch for the distro ASCII art, because I've noticed that if I call hyfetch directly from Git Bash, it replaces fastfetch's ASCII art for Windows 11 with neowofetch's ASCII art (which is different).
Just tried it myself. Hyfetch forces me installing Git Windows (while fastfetch doesn't use bash and I do have Git Windows installed). If I run hyfetch in Git Bash, it stacks with
Welcome to hyfetch Let's set up some colors first.
1. Detected color mode: rgb
2. Is your terminal in light mode or dark mode? (light|dark)
>
Even Ctrl+C
doesn't work
The issue only occurs if you have WSL, since it adds a bash.exe
to PATH. As for the config with Git Bash, I had to copy my config from WSL after setting it up there. The setup not working on Windows is a separate issue.
Because of the bad experience, I prefer using fastfetch directly. I customised the logo with
fastfetch --logo-color-1 blue --logo-color-2 green --logo-color-3 cyan --logo-color-4 magenta --logo-padding-top 2
I think it's good-looking enough
Maybe it would be better to make fastfetch the default backend on Windows and somehow install fastfetch as a dependency, since Windows doesn't have a proper built-in bash environment and different third-party implementations come with different quirks...
Maybe it would be better to make fastfetch the default backend on Windows and somehow install fastfetch as a dependency, since Windows doesn't have a proper built-in bash environment and different third-party implementations come with different quirks...
...but even then the Windows terminal (or CMD on older versions of Windows) wouldn't support outputting ANSI RGB colors with a simple ascii file replacement on the fastfetch backend. So I guess the best bet is still to embed a specific version of git bash into hyfetch packaging.
Describe the bug
Trying to run hyfetch with WSL installed causes it to launch WSL's bash instead of Git Bash
Expected behavior
Git Bash is run instead of WSL Bash
Screenshots
Config file
I don't have a config file
Additional context