From 1b336f912e8911c1efd8dd3a32d100e540f7d46c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 12 Aug 2016 11:25:59 +1000 Subject: [PATCH] Added verbose messages for confog sourcing --- neofetch | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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'