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:
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)
# 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.