I'm using Fastfetch in my Hyprland setup with the Zsh shell, and although I have the Fastfetch script in my .zshrc, it won't render the image specified in my JSONC configuration file. Instead, it defaults to printing ASCII art. However, when I run `fastfetch` directly in the terminal, it works perfectly fine. What could be causing this issue?
2 Answers
It sounds like your .zshrc runs Fastfetch without the same environment as your terminal when it starts up. When you launch it manually, it finds your JSON configuration file, but on startup, it defaults to ASCII. To fix this, try using an absolute path for your JSON config in the .zshrc. For example:
`fastfetch --config /home/youruser/.config/fastfetch/config.jsonc`
Also, double-check that the Kitty terminal is up and running when your .zshrc is executed because sometimes the terminal isn't fully initialized yet.
If you're still having issues, adding an environment check might help. You can add something like this to your .zshrc:
`if [[ $TERM == xterm-kitty ]]; then
fastfetch --config $HOME/.config/fastfetch/config.jsonc
fi`
This way, it'll only run Fastfetch when the terminal is indeed Kitty, but make sure that the correct configurations and paths are set!
Related Questions
How To Get Your Domain Unblocked From Facebook
How To Find A String In a Directory of Files Using Linux