Added verbose messages for confog sourcing
This commit is contained in:
parent
7480d5c30d
commit
1b336f912e
1 changed files with 8 additions and 5 deletions
13
neofetch
13
neofetch
|
@ -2540,11 +2540,11 @@ getdefaultconfig 2>/dev/null
|
|||
|
||||
# Source Config {{{
|
||||
|
||||
# Check for $config_file first
|
||||
getconfig () {
|
||||
# Check $config_file
|
||||
if [ -f "$config_file" ]; then
|
||||
source "$config_file"
|
||||
err "Sourced user config ($config_file)"
|
||||
return
|
||||
fi
|
||||
mkdir -p "$XDG_CONFIG_HOME/neofetch/"
|
||||
|
@ -2552,22 +2552,25 @@ getconfig () {
|
|||
# Check $XDG_CONFIG_HOME/neofetch and create the
|
||||
# dir/files if they don't exist.
|
||||
if [ -f "$XDG_CONFIG_HOME/neofetch/config" ]; then
|
||||
source "$XDG_CONFIG_HOME/neofetch/config"
|
||||
config_file="$XDG_CONFIG_HOME/neofetch/config"
|
||||
|
||||
elif [ -f "/usr/share/neofetch/config" ]; then
|
||||
cp "/usr/share/neofetch/config" "$XDG_CONFIG_HOME/neofetch"
|
||||
source "$XDG_CONFIG_HOME/neofetch/config"
|
||||
config_file="$XDG_CONFIG_HOME/neofetch/config"
|
||||
|
||||
elif [ -f "/usr/local/share/neofetch/config" ]; then
|
||||
cp "/usr/local/share/neofetch/config" "$XDG_CONFIG_HOME/neofetch"
|
||||
source "$XDG_CONFIG_HOME/neofetch/config"
|
||||
config_file="$XDG_CONFIG_HOME/neofetch/config"
|
||||
|
||||
else
|
||||
getscriptdir
|
||||
|
||||
cp "$script_dir/config/config" "$XDG_CONFIG_HOME/neofetch"
|
||||
source "$XDG_CONFIG_HOME/neofetch/config"
|
||||
config_file="$XDG_CONFIG_HOME/neofetch/config"
|
||||
fi
|
||||
|
||||
source "$config_file"
|
||||
err "Sourced user config ($config_file)"
|
||||
}
|
||||
|
||||
# Check the commandline flags early for '--config none/off'
|
||||
|
|
Loading…
Reference in a new issue