From b0a0454f52a53ebf448016bdbe9e2eb1a9626022 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 30 Jun 2017 13:36:56 +0700 Subject: [PATCH 1/4] CPU: Remove unneeded outputs from AMD APUs --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index eb8b7d2f..551342b3 100755 --- a/neofetch +++ b/neofetch @@ -1038,6 +1038,7 @@ get_cpu() { cpu="${cpu//Quad-Core}" cpu="${cpu//Six-Core}" cpu="${cpu//Eight-Core}" + cpu="${cpu//, * Compute Cores}" cpu="${cpu//Core}" cpu="${cpu//with Radeon * Graphics}" cpu="${cpu//, altivec supported}" From 8ded6cc935b3692deddb2e443cb8d3781c22437a Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 1 Jul 2017 09:08:47 +1000 Subject: [PATCH 2/4] config: Add .conf extensionn, remove shebang. --- .travis.yml | 2 +- config/{config => config.conf} | 2 -- config/{travis => travis.conf} | 2 -- neofetch | 38 +++++++++++++++++----------------- 4 files changed, 20 insertions(+), 24 deletions(-) rename config/{config => config.conf} (99%) rename config/{travis => travis.conf} (97%) diff --git a/.travis.yml b/.travis.yml index f2566128..381e0cab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi script: - - time ./neofetch --ascii --config config/travis -v + - time ./neofetch --ascii --config config/travis.conf -v # See this wiki page for why we're disabling these errors. # https://github.com/dylanaraps/neofetch/wiki/Shellcheck-Exclusions - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck neofetch -e SC1090,SC2009,SC2012,SC2016,SC2034,SC2128,SC2153,SC2154,SC2178,SC2010; fi diff --git a/config/config b/config/config.conf similarity index 99% rename from config/config rename to config/config.conf index 78117864..1575de10 100644 --- a/config/config +++ b/config/config.conf @@ -1,5 +1,3 @@ -#!/usr/bin/env bash -# # Neofetch config file # https://github.com/dylanaraps/neofetch diff --git a/config/travis b/config/travis.conf similarity index 97% rename from config/travis rename to config/travis.conf index 903818f9..ad3bac08 100644 --- a/config/travis +++ b/config/travis.conf @@ -1,5 +1,3 @@ -#!/usr/bin/env bash -# # Neofetch config file for travis.ci # https://github.com/dylanaraps/neofetch diff --git a/neofetch b/neofetch index eb8b7d2f..3f36e3bb 100755 --- a/neofetch +++ b/neofetch @@ -3601,21 +3601,21 @@ get_full_path() { } get_default_config() { - if [[ -f "/etc/neofetch/config" ]]; then - default_config="/etc/neofetch/config" + if [[ -f "/etc/neofetch/config.conf" ]]; then + default_config="/etc/neofetch/config.conf" - elif [[ -f "/usr/local/etc/neofetch/config" ]]; then - default_config="/usr/local/etc/neofetch/config" + elif [[ -f "/usr/local/etc/neofetch/config.conf" ]]; then + default_config="/usr/local/etc/neofetch/config.conf" - elif [[ -f "/data/data/com.termux/files/usr/etc/neofetch/config" ]]; then - default_config="/data/data/com.termux/files/usr/etc/neofetch/config" + elif [[ -f "/data/data/com.termux/files/usr/etc/neofetch/config.conf" ]]; then + default_config="/data/data/com.termux/files/usr/etc/neofetch/config.conf" - elif [[ -f "/boot/home/config/non-packaged/etc/neofetch/config" ]]; then - default_config="/boot/home/config/non-packaged/etc/neofetch/config" + elif [[ -f "/boot/home/config/non-packaged/etc/neofetch/config.conf" ]]; then + default_config="/boot/home/config/non-packaged/etc/neofetch/config.conf" else [[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")" - default_config="${script_dir%/*}/config/config" + default_config="${script_dir%/*}/config/config.conf" fi if source "$default_config"; then @@ -3637,22 +3637,22 @@ get_user_config() { # Check ${XDG_CONFIG_HOME}/neofetch and create the # dir/files if they don't exist. - if [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then - config_file="${XDG_CONFIG_HOME}/neofetch/config" + if [[ -f "${XDG_CONFIG_HOME}/neofetch/config.conf" ]]; then + config_file="${XDG_CONFIG_HOME}/neofetch/config.conf" - elif [[ -f "/etc/neofetch/config" ]]; then - cp "/etc/neofetch/config" "${XDG_CONFIG_HOME}/neofetch" - config_file="${XDG_CONFIG_HOME}/neofetch/config" + elif [[ -f "/etc/neofetch/config.conf" ]]; then + cp "/etc/neofetch/config.conf" "${XDG_CONFIG_HOME}/neofetch.conf" + config_file="${XDG_CONFIG_HOME}/neofetch/config.conf" - elif [[ -f "/usr/local/etc/neofetch/config" ]]; then - cp "/usr/local/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch" - config_file="${XDG_CONFIG_HOME}/neofetch/config" + elif [[ -f "/usr/local/etc/neofetch/config.conf" ]]; then + cp "/usr/local/share/neofetch/config.conf" "${XDG_CONFIG_HOME}/neofetch" + config_file="${XDG_CONFIG_HOME}/neofetch/config.conf" else [[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")" - cp "${script_dir%/*}/config/config" "${XDG_CONFIG_HOME}/neofetch" - config_file="${XDG_CONFIG_HOME}/neofetch/config" + cp "${script_dir%/*}/config/config.conf" "${XDG_CONFIG_HOME}/neofetch" + config_file="${XDG_CONFIG_HOME}/neofetch/config.conf" fi source "$config_file" From fe793fa440580bb38ed7ce8eaa3062bc76d94f4a Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 1 Jul 2017 09:16:41 +1000 Subject: [PATCH 3/4] config: Remove one too many .confs --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 3f36e3bb..a7081f77 100755 --- a/neofetch +++ b/neofetch @@ -3641,7 +3641,7 @@ get_user_config() { config_file="${XDG_CONFIG_HOME}/neofetch/config.conf" elif [[ -f "/etc/neofetch/config.conf" ]]; then - cp "/etc/neofetch/config.conf" "${XDG_CONFIG_HOME}/neofetch.conf" + cp "/etc/neofetch/config.conf" "${XDG_CONFIG_HOME}/neofetch" config_file="${XDG_CONFIG_HOME}/neofetch/config.conf" elif [[ -f "/usr/local/etc/neofetch/config.conf" ]]; then From 48d2d8cc1c780ac787c7c8aeb242228b443860d3 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 1 Jul 2017 09:18:32 +1000 Subject: [PATCH 4/4] config: Add backwards compatibility with old filename. --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index a7081f77..b772d4cb 100755 --- a/neofetch +++ b/neofetch @@ -3637,7 +3637,10 @@ get_user_config() { # Check ${XDG_CONFIG_HOME}/neofetch and create the # dir/files if they don't exist. - if [[ -f "${XDG_CONFIG_HOME}/neofetch/config.conf" ]]; then + if [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then + config_file="${XDG_CONFIG_HOME}/neofetch/config" + + elif [[ -f "${XDG_CONFIG_HOME}/neofetch/config.conf" ]]; then config_file="${XDG_CONFIG_HOME}/neofetch/config.conf" elif [[ -f "/etc/neofetch/config.conf" ]]; then