You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
$ neofetch --config with no path specified (i.e., it should be called as $ neofetch --config /path/to/config.conf) should list the currently-used config file.
I think that occurs here and I could probably add it in a pull request...
get_user_config() {
# --config /path/to/config.conf
if [[ -f "$config_file" ]]; then
source "$config_file"
err "Config: Sourced user config. (${config_file})"
return
elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config.conf" ]]; then
source "${XDG_CONFIG_HOME}/neofetch/config.conf"
err "Config: Sourced user config. (${XDG_CONFIG_HOME}/neofetch/config.conf)"
elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then
source "${XDG_CONFIG_HOME}/neofetch/config"
err "Config: Sourced user config. (${XDG_CONFIG_HOME}/neofetch/config)"
elif [[ -z "$no_config" ]]; then
config_file="${XDG_CONFIG_HOME}/neofetch/config.conf"
# The config file doesn't exist, create it.
mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
printf '%s\n' "$config" > "$config_file"
fi
}
Neofetch version
7.1.0
Config file
That's what I'm looking for!
The text was updated successfully, but these errors were encountered:
get_user_config() {
# --config /path/to/config.conf
if [[ -f "$config_file" ]]; then
source "$config_file"
err "Config: Sourced user config. (${config_file})"
config_file_path="$config_file"
return
elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config.conf" ]]; then
source "${XDG_CONFIG_HOME}/neofetch/config.conf"
err "Config: Sourced user config. (${XDG_CONFIG_HOME}/neofetch/config.conf)"
config_file_path="${XDG_CONFIG_HOME}/neofetch/config.conf"
elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then
source "${XDG_CONFIG_HOME}/neofetch/config"
err "Config: Sourced user config. (${XDG_CONFIG_HOME}/neofetch/config)"
config_file_path="${XDG_CONFIG_HOME}/neofetch/config"
elif [[ -z "$no_config" ]]; then
config_file="${XDG_CONFIG_HOME}/neofetch/config.conf"
config_file_path="${XDG_CONFIG_HOME}/neofetch/config.conf"
# The config file doesn't exist, create it.
mkdir -p "${XDG_CONFIG_HOME}/neofetch/"
printf '%s\n' "$config" > "$config_file"
fi
}
and from the end of the case statement:
# Other
"--config")
case $2 in
"none" | "off") ;;
"") get_user_config; printf '\nThe location of the config file is %s\n\n' "$config_f>
*)
config_file="$(get_full_path "$2")"
get_user_config
;;
esac
iconoclasthero
changed the title
neofetch --config returns the location of the config file
feature request neofetch --config returns the location of the config file
Mar 22, 2024
Per the "Getting Started" page, the default config path is $HOME/.config/neofetch/config.conf
Using the --config flag does not result in a persistent change to the config path as it it must be specified each time when using neofetch.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
$ neofetch --config
with no path specified (i.e., it should be called as$ neofetch --config /path/to/config.conf
) should list the currently-used config file.I think that occurs here and I could probably add it in a pull request...
Neofetch version
7.1.0
Config file
That's what I'm looking for!
The text was updated successfully, but these errors were encountered: