Fastfetch not always used

I have fastfetch installed and want a smaller configuration to be started, every time i open a terminal. This in itself works perfectly. However most of the times the colors don’t load at all but i get the information as well as the small logo of my distro. The command to start fastfetch is inside my .zshrc and the command used is the following:

fastfetch -c /home/nico/.config/fastfetch/os.jsonc

Is there anything i am missing like an additional flag to always load the colors?

Are you talking about the colors module?
Screenshot_20240810_013740
If so you will need to add this under modules

No, i mean the actual text and logo colors, the colored blocks are either way disabled, but that was at least on purpose

Does it load with the colors with the defaults?
Also what terminal, is it possible there is a setting here that needs to be enabled?

It does load if i type the command given in the question. And the “big” fastfetch config also loads perfectly with all the colors

The terminal i am using is kitty with zsh

Try running the one that isn’t working with the --show-errors flag and see if this shows anything useful
Also maybe this

Maybe for clarification:
The first is the wrong output without any colors,
if i type the command als given .zshrc i get the second, which is what i want,
the last one is with my standard config, which also looks good (to me)

Unfortunately it just shows the desired output without any additional information

Can we see your .zshrc?

Yeah sure:

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
#   source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
# fi


# The following lines were added by compinstall
zstyle :compinstall filename '/home/nico/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
# End of lines configured by zsh-newuser-install
# source /share/powerlevel10k/powerlevel10k.zsh-theme
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

# List aliases
alias ll="ls -l"
alias la="ls -a"
alias lla="ls -l -a"

# Faster dotnet run
alias dtn="dotnet run"

# Connect to zilex server


# Run fastfetch (visual only)
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
fastfetch -c /home/nico/.config/fastfetch/os.jsonc

I had to remove one alias, since it contains sensitive company data.

Moved the line to the top and after reading the output from powershell 10k by enabling the typeset proved to be the solution. Quite embarrassing, but i guess sometimes reading the output is everything it takes.

2 Likes

Yes, that is why I wanted to see what else you were doing in there. :slight_smile:

2 Likes

But thank you for pointing me in that direction!

1 Like