Neofetch: Image: 'auto' doesn't exist, falling back to ascii mode.

Created on 9 Oct 2017  路  9Comments  路  Source: dylanaraps/neofetch

Description

As the title says, I'm failing with the auto detection.
Same happens when using wallpaper.

The culprit is:
https://github.com/dylanaraps/neofetch/blob/fd04aa14aefa71f3f4289d4d657418e449fab25a/neofetch#L2495
Changing the index to 6 solves it for me.

image="$(awk -F\' '/feh/ {printf $6}' "${HOME}/.fehbg")"

However, as it has been working for me up until now I wanted to discuss this in an issue first before PRing anything.
The only major change on my system has been some gnome 3.26 related updates but as I'm using i3wm and feh this _shouldn't_ have change anything.

My .fehbg:

#!/bin/sh
'feh' '--bg-fill' '<path to image>'

Neofetch version

Neofetch 3.3.0

Config file

https://pastebin.com/57rU2mUe

Verbose log

https://pastebin.com/Yqpkiya7

Bug

All 9 comments

Fixed!

Please test out master and let me know if it works on your end.

Not quite.

The original .fehbg content is:

#!/bin/sh
'feh' '--bg-fill' '<path to image>'

and after the bash substation the image variable contains:

feh' '--bg-fill' '<path to image>

I can try and fix it tomorrow if you want. Is getting late over here and I need sleep :P

p.s. here a verbose log with the latest master
https://pastebin.com/XExgyxHh

Ah!

My .fehbg doesn't contain quotes around feh and the arguments. I need to come up with a solution that works for both. :)

Example:

#!/bin/sh
feh  --bg-fill '/home/dylan/Pictures/Qyi880m.jpg' 

Try the latest master, it should be fixed now.

nope, now the variable is empty :)

Can you send me your exact file so I can test with it?

It's just as I posted above :)

#!/bin/sh
'feh' '--bg-fill' '/home/tadly/Pictures/Wallpapers/Anime - Manga/088.jpg'

Just as a quick draft up.
This will work as long as we can assume that there'll always be two columns before the file-path.
What this awk does is print all columns BUT the first two.

cat .fehbg | tail -n 1 | awk '{$1=$2=""; print $0}'

Maybe this'll help to get us somewhere :)

I'm signing off for today now though. ;)

This took way to long to figure out ':D

Pretty much back to the roots I'd say.
This will (again) change the separator to ', take only the line containing feh and (now the magic) print the column before the very last one (The last one's empty).

image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")"

Tested with both, your and my .fehbg :)

Awesome!

Pushed to master. :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  5Comments

iraquitan picture iraquitan  路  10Comments

Neil-seu picture Neil-seu  路  9Comments

e-caste picture e-caste  路  7Comments

KevinParnell picture KevinParnell  路  9Comments