Closed filipekiss closed 6 years ago
Same issue here, I am on 5.0.1. I installed with brew install neofetch --HEAD
However, I am using iterm2 as the backend. The imgcat
command shows the picture just fine.
Well, I don't think there is a --imgcat
option.
Tried with neofetch --iterm2 $HOME/neofetch.png
?
I had the same issue on arch/arcolinux. I rolled back to the version of neofetch that is on the aur (as opposed to the one in the repo it (arcolinux) wants to update) and it works. Hope that helps someone.
@MindTooth yeah, the result is the same :/
@sharkytowers I'll try the previous version! Thanks
@filipekiss I think I have version 3.3.0-1 which I know is old, but it is working for me. I did a makefile after cloning whatever was on the AUR
I can confirm this is a problem and narrow it down for you.
If you update to the latest version of neofetch on Arch 5.0.0-1 and use config.conf the images do NOT work. If you rename the same config.conf to config the images WILL display.
Something in the renaming of the file has gone wrong.
Using the naming convention config.conf
Using the same code but naming convention config.
@erikdubois I'm running macOS and tried this, but did not work :( I still get the weird binary dump.
Make sure that none of the images are being used. All hashtags before them. Backend should be ascii
Hi, I have created a pull request to fix this. However, you can manually add "unset IFS" to the function:
get_window_size(){
IFS=';t' read -d t -t 1 -sra term_size
unset IFS
}
@filipekiss you may try this. enjoy!
Notice: If you have a old version bash, change the timeout option to 1 (because old version can not support 0.05 as timeout option) as in my code. (Sorry forgot mentioning this)
I have added this line to the variables at the top
config_file="${XDG_CONFIG_HOME}/neofetch/config.conf"
and then the image shows. Can it be that the variable is empty when first used?
@erikdubois I debugged on MacOS and found the issue is caused by empty assigned variables because the IFS is not unset after usage.
The variable I mentioned up there. It works here now.
Hey @StarryTony, thank you for your time. That still doesn't work for me =(
I'll keep fiddling around and see if I can find what's causing this.
@filipekiss For my MacOS (the same version but with zsh 5.3, iterm2), I found it caused by null windows size and had the same error output. The solution works for me. You may try -vv option to get a full diagnosis information. Hope it helps.
I have same issue on macOS and found it also caused by null windows size.
But adding unset IFS
did not solve it, after some debugging I found out the reason and the solution for me.
It turns out that macOS is using bash version 3.2.57
which did not support read -t 0.05
option.
so I just changed
IFS=';t' read -d t -t 0.05 -sra term_size
to
IFS=';t' read -d t -sra term_size
and it worked!
For those who still have the problem, there is another way: update bash to the newest version.
For macOS user is:
brew install bash
then add #!/usr/local/bin/bash
to the first line of neofetch(which locates at /usr/local/bin/neofetch
).
Oh sorry to forget mentioning that if you have an old version of bash, you probably change the timeout option to 1 because it cannot support 0.05. My code has changed that but I forgot mentioning that. I am using bash 3.2 for the neofetch too.
Updating bash version was the solution! Thank you @StarryTony! (Just updated it, didn't even need to change the shebang nor the IFS
!)
Congrats!
Just installing bash brew install bash
worked for me.
Thanks !
I am using zsh 5.6.2 on a fresh High Sierra Mac OS, and the image did not displayed.
I changed the timeout of the read
(in the get_window_size
function) and it works !!!
So I changed
IFS=';t' read -d t -t 0.05 -sra term_size
into
IFS=';t' read -d t -t 1 -sra term_size
and everything is fine, now
Thanks again !!
Hey folks, I'm a little confused about this.
I'm using Bash 4.4 and iterm2 on MacOS Sierra.
I tried adding get_window_size
with little success. Whats the expected ~/.config/neofetch/config.conf
to get this working?
Description
I've updated my config to use an image instead of the ascii art but it's not working. If I don't pass any parameters, it will use the ascii art and if I pass, for example,
--imgcat --source /path/to/img
it breaks. iTerm is ok with the images becauseimgcat
works as expected. I've also tried runningneofetch
underbash
instead ofzsh
but the result is the same.Neofetch version
Neofetch 5.0.0 OS: macOS High Sierra 10.13.5 17F77 Host: MacBookPro14,1 Shell: zsh 5.5.1 Terminal: iTerm2
Screenshot
If i run
neofetch
with no arguments:If I pass
--imgcat --source $HOME/neofetch.png
it hangs for a while at this screen:Then this flashes: and then the screen is cleared
Config file
https://gist.github.com/filipekiss/39c459ba4d7b9703b3a11f306a1a8533#file-config-conf
Verbose log
https://gist.github.com/filipekiss/39c459ba4d7b9703b3a11f306a1a8533#file-neofetch-log