diff --git a/neofetch b/neofetch index 66c4ab3c..0ba3dd29 100755 --- a/neofetch +++ b/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'