From 6c957f3ba2ac7cc91f0c5dc5110f9f771a482c4a Mon Sep 17 00:00:00 2001 From: dylan araps Date: Thu, 27 Apr 2017 13:37:33 +1000 Subject: [PATCH 01/43] OS: Very early support for IRIX --- ascii/distro/irix | 19 +++++++++++++++++++ neofetch | 6 ++++++ 2 files changed, 25 insertions(+) create mode 100644 ascii/distro/irix diff --git a/ascii/distro/irix b/ascii/distro/irix new file mode 100644 index 00000000..57ce2121 --- /dev/null +++ b/ascii/distro/irix @@ -0,0 +1,19 @@ +${c1} ./ohmNd/ +dNmho/- + `:+ydNMMMMMMMM.-MMMMMMMMMdyo:. + `hMMMMMMNhs/sMMM-:MMM+/shNMMMMMMh` + -NMMMMMmo-` /MMM-/MMM- `-omMMMMMN. + `.`-+hNMMMMMNhyMMM-/MMMshmMMMMMmy+...` ++mMNds:-:sdNMMMMMMMyyMMMMMMMNdo:.:sdMMm+ +dMMMMMMmy+.-/ymNMMMMMMMMNmy/-.+hmMMMMMMd +oMMMMmMMMMNds:.+MMMmmMMN/.-odNMMMMmMMMM+ +.MMMM-/ymMMMMMmNMMy..hMMNmMMMMMmy/-MMMM. + hMMM/ `/dMMMMMMMN////NMMMMMMMd/. /MMMh + /MMMdhmMMMmyyMMMMMMMMMMMMhymMMMmhdMMM: + `mMMMMNho//sdMMMMM//NMMMMms//ohNMMMMd + `/so/:+ymMMMNMMMM` mMMMMMMMmh+::+o/` + `yNMMNho-yMMMM` NMMMm.+hNMMNh` + -MMMMd: oMMMM. NMMMh :hMMMM- + -yNMMMmooMMMM- NMMMyomMMMNy- + .omMMMMMMMM-`NMMMMMMMmo. + `:hMMMMMM. NMMMMMh/` + .odNm+ /dNms. diff --git a/neofetch b/neofetch index b85745f3..cfbf56bc 100755 --- a/neofetch +++ b/neofetch @@ -43,6 +43,7 @@ get_os() { "Haiku") os="Haiku" ;; "MINIX") os="MINIX" ;; "AIX") os="AIX" ;; + "IRIX64") os="IRIX" ;; *) printf "%s\n" "Unknown OS detected: '$kernel_name', aborting..." >&2 printf "%s\n" "Open an issue on GitHub to add support for your OS." >&2 @@ -3372,6 +3373,11 @@ get_distro_colors() { set_colors 3 7 ascii_file="solaris" ;; + + "IRIX") + set_colors 4 7 + ascii_file="irix" + ;; esac ;; esac From 54bf42f1b61b38e643aee67700f7ee71c7a70d1c Mon Sep 17 00:00:00 2001 From: dylan araps Date: Thu, 27 Apr 2017 13:51:57 +1000 Subject: [PATCH 02/43] Distro: Add support for IRIX --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index cfbf56bc..38af190b 100755 --- a/neofetch +++ b/neofetch @@ -206,6 +206,10 @@ get_distro() { "AIX") distro="AIX $(oslevel)" ;; + + "IRIX") + distro="IRIX ${kernel_version}" + ;; esac [[ -z "$distro" ]] && distro="$os (Unknown)" From 00e2006e48c44fcbc807a51ee383d495f7b96cf7 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 8 May 2017 17:38:05 +0700 Subject: [PATCH 03/43] CPU [IRIX]: Initial support --- neofetch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/neofetch b/neofetch index 38af190b..217d947a 100755 --- a/neofetch +++ b/neofetch @@ -976,6 +976,17 @@ get_cpu() { "physical") cores="$(lparstat -i | awk -F':' '/Active Physical CPUs/ {printf $2}')" esac ;; + + "IRIX") + # Get CPU name. + cpu="$(hinv -c | awk -F':' '/CPU:/ {printf $2}')" + + # Get CPU speed. + cpu="$(hinv -c | awk 'NR==1{printf $2}')" + + # Get CPU cores. + cores="$(sysconf NPROC_ONLN)" # Does this even work? + ;; esac if [[ "$speed" ]]; then @@ -1054,6 +1065,7 @@ get_cpu_usage() { "Haiku") cores="$(sysinfo -cpu | grep -c -F 'CPU #')" ;; "iPhone OS") cores="${cpu/*\(}"; cores="${cores/\)*}" ;; "AIX") cores="$(lparstat -i | awk -F':' '/Online Virtual CPUs/ {printf $2}')" ;; + "IRIX") cores="$(sysconf NPROC_ONLN)" # Does this even work? esac fi From e96d0e4cf60dad59dcc3f17b46385d5c58a37a32 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 8 May 2017 17:49:47 +0700 Subject: [PATCH 04/43] Kernel [IRIX]: Disable function --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 217d947a..a4f74770 100755 --- a/neofetch +++ b/neofetch @@ -322,8 +322,8 @@ get_title() { } get_kernel() { - # Since AIX is an integrated system, it's better to skip this function altogether - [[ "$os" == "AIX" ]] && return + # Since these OSes are integrated systems, it's better to skip this function altogether + [[ "$os" =~ (AIX|IRIX) ]] && return case "$kernel_shorthand" in "on") kernel="$kernel_version" ;; From a3af0a3f3e6e81571c0c52c9dfd1c99b42f0f1ec Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 8 May 2017 17:59:48 +0700 Subject: [PATCH 05/43] Uptime [IRIX]: Use AIX method --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index a4f74770..4b2bf7d3 100755 --- a/neofetch +++ b/neofetch @@ -371,7 +371,7 @@ get_uptime() { seconds="${seconds/.*}" ;; - "AIX") + "AIX" | "IRIX") t="$(LC_ALL=POSIX ps -o etime= -p 1)" d="0" h="0" case "$t" in *"-"*) d="${t%%-*}"; t="${t#*-}";; esac From 05171be3a16e192fef439ff669bd1279d3106b88 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 8 May 2017 22:12:03 +0700 Subject: [PATCH 06/43] Local IP [IRIX]: Added initial support --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 4b2bf7d3..ac96137f 100755 --- a/neofetch +++ b/neofetch @@ -1936,7 +1936,7 @@ get_battery() { get_local_ip() { case "$os" in - "Linux" | "BSD" | "Solaris" | "AIX") + "Linux" | "BSD" | "Solaris" | "AIX" | "IRIX") local_ip="$(ip route get 1 | awk -F'src' '{print $2; exit}')" local_ip="${local_ip/uid*}" [[ -z "$local_ip" ]] && local_ip="$(ifconfig -a | awk '/broadcast/ {print $2; exit}')" From ff3f0198d7cd193603ae6404ba37f60c45d0da6e Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 10 May 2017 23:35:38 +0700 Subject: [PATCH 07/43] Disk: Separate IRIX detection from the rest of the OS --- neofetch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index ac96137f..d477d7ef 100755 --- a/neofetch +++ b/neofetch @@ -1808,6 +1808,7 @@ get_disk() { "Haiku") err "Disk doesn't work on Haiku due to the non-standard 'df'"; return ;; "Mac OS X") df_flags=(-P -h) ;; "AIX") df_flags=(-P -g) ;; + "IRIX") df_flags=(-P -k) ;; *) df_flags=(-h) ;; esac @@ -1827,7 +1828,15 @@ get_disk() { disk_info=($disk) disk_perc="${disk_info[4]/'%'}" - disk="${disk_info[2]/i} / ${disk_info[1]/i} (${disk_perc}%)" + case "$os" in + "IRIX") + disk="$((disk_info[2]/1024/1024))G / $((disk_info[2]/1024/1024))G (${disk_perc}%)" + ;; + + *) + disk="${disk_info[2]/i} / ${disk_info[1]/i} (${disk_perc}%)" + ;; + esac # Subtitle. case "$disk_subtitle" in From ea1f853c2a90cbece44ef7c013e7edd474d0681d Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 12 May 2017 23:31:38 +0700 Subject: [PATCH 08/43] Disk: Detect df version instead of detecting df per OS --- neofetch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/neofetch b/neofetch index d477d7ef..de11ce83 100755 --- a/neofetch +++ b/neofetch @@ -1803,13 +1803,13 @@ get_disk() { type -p df >/dev/null 2>&1 || \ { err "Disk requires 'df' to function. Install 'df' to get disk info."; return; } - # Get "df" flags. - case "$os" in - "Haiku") err "Disk doesn't work on Haiku due to the non-standard 'df'"; return ;; - "Mac OS X") df_flags=(-P -h) ;; - "AIX") df_flags=(-P -g) ;; - "IRIX") df_flags=(-P -k) ;; - *) df_flags=(-h) ;; + # Get "df" version. + df_version="$(df --version 2>&1)" + case "$df_version" in + *"blocks"*) err "Your version of df cannot be used due to the non-standard flags" ; return ;; # Haiku + # AIX unknown + # IRIX unknown + *) df_flags=(-P -h) ;; esac # Create an array called 'disks' where each element is a separate line from @@ -1828,8 +1828,8 @@ get_disk() { disk_info=($disk) disk_perc="${disk_info[4]/'%'}" - case "$os" in - "IRIX") + case "$df_version" in + "IRIX") # To be changed disk="$((disk_info[2]/1024/1024))G / $((disk_info[2]/1024/1024))G (${disk_perc}%)" ;; From 2212cab6880250bfb8cc5645504f0b7a554f1f2a Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 13 May 2017 11:36:30 +0700 Subject: [PATCH 09/43] Disk [AIX df]: Add version detection --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index de11ce83..bc2c3f9f 100755 --- a/neofetch +++ b/neofetch @@ -1807,7 +1807,7 @@ get_disk() { df_version="$(df --version 2>&1)" case "$df_version" in *"blocks"*) err "Your version of df cannot be used due to the non-standard flags" ; return ;; # Haiku - # AIX unknown + *"recognized flag"*) df_flags=(-P -g) ;; # AIX, untested # IRIX unknown *) df_flags=(-P -h) ;; esac From d0cb265517aac47c363efc06123e4d662bd929a9 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 15 May 2017 21:18:31 +0700 Subject: [PATCH 10/43] Install Date [IRIX]: Added initial support --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index bc2c3f9f..099947da 100755 --- a/neofetch +++ b/neofetch @@ -2004,7 +2004,7 @@ get_install_date() { esac ;; "Haiku") install_file="/boot" ;; - "BSD" | "MINIX") + "BSD" | "MINIX" | "IRIX") case "$kernel_name" in "FreeBSD") install_file="/etc/hostid" ;; "NetBSD" | "DragonFly"*) install_file="/etc/defaults/rc.conf" ;; @@ -2020,7 +2020,7 @@ get_install_date() { *"crtime"*) install_date="$(ls -tdcE "$install_file" | awk '{printf $6 " " $7}')" ;; # xpg4 (Solaris) *"ACFHLRSZ"*) install_date="$(ls -dl "$install_file" | awk '{printf $6 " " $7}')" ;; # Toybox *"GNU coreutils"*) install_date="$(ls -tcd --full-time "$install_file" | awk '{printf $6 " " $7}')" ;; - *"ACFHLNRS"*) err "Install Date doesn't work because your 'ls' does not support showing full date and time."; return ;; # AIX ls + *"ACFHLNRS"* | *"RadC1xmnlog"*) err "Install Date doesn't work because your 'ls' does not support showing full date and time."; return ;; # AIX ls / IRIX ls *) install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')" ;; esac From 928bb6296d02a06abfce557dc00e1dbaa35236c9 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 16 May 2017 14:47:35 +0700 Subject: [PATCH 11/43] Disk [IRIX]: Added support --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 099947da..97d6151a 100755 --- a/neofetch +++ b/neofetch @@ -1808,7 +1808,7 @@ get_disk() { case "$df_version" in *"blocks"*) err "Your version of df cannot be used due to the non-standard flags" ; return ;; # Haiku *"recognized flag"*) df_flags=(-P -g) ;; # AIX, untested - # IRIX unknown + *"befhikm"*) df_flags=(-P -k) ;; # IRIX *) df_flags=(-P -h) ;; esac @@ -1829,7 +1829,7 @@ get_disk() { disk_perc="${disk_info[4]/'%'}" case "$df_version" in - "IRIX") # To be changed + *"befhikm"*) disk="$((disk_info[2]/1024/1024))G / $((disk_info[2]/1024/1024))G (${disk_perc}%)" ;; From 2fcbc778f105c179cd28bdd6b1a0ff9c9d99f249 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 16 May 2017 14:58:47 +0700 Subject: [PATCH 12/43] Memory [IRIX]: Added initial support --- neofetch | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neofetch b/neofetch index 97d6151a..918c4c24 100755 --- a/neofetch +++ b/neofetch @@ -1295,6 +1295,13 @@ get_memory() { mem_used="$((mem_total - mem_free))" mem_label="MB" ;; + + "IRIX") + mem_stat=($(pmem | head -1)) + mem_total="$((${mem_stat[3]} / 1024))" + mem_free="$((${mem_stat[5]} / 1024))" + mem_used="$((mem_total - mem_free))" + ;; esac memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}" From 2b5926292815b12d1dc5dfa1f439b957934acb07 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 16 May 2017 15:04:26 +0700 Subject: [PATCH 13/43] Memory [IRIX]: Shellcheck compliance --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 918c4c24..81f8b736 100755 --- a/neofetch +++ b/neofetch @@ -1298,8 +1298,8 @@ get_memory() { "IRIX") mem_stat=($(pmem | head -1)) - mem_total="$((${mem_stat[3]} / 1024))" - mem_free="$((${mem_stat[5]} / 1024))" + mem_total="$((mem_stat[3] / 1024))" + mem_free="$((mem_stat[5] / 1024))" mem_used="$((mem_total - mem_free))" ;; esac From 0b77804a65a269e3d4a1d25586839e37571271a6 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 16 May 2017 15:08:09 +0700 Subject: [PATCH 14/43] Packages [IRIX]: Added initial support --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index 81f8b736..2b2fd13c 100755 --- a/neofetch +++ b/neofetch @@ -537,6 +537,10 @@ get_packages() { packages="$(lslpp -J -l -q | grep -cv '^#')" packages="$((packages+=$(rpm -qa | wc -l)))" ;; + + "IRIX") + packages="$(($(versions -b | wc -l)-3))" + ;; esac ((packages == 0)) && unset packages From 7f173060806f53a1a0c116a36efcfa7e65fe3d7b Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 22 May 2017 16:50:24 +0700 Subject: [PATCH 15/43] CPU [IRIX]: Fix CPU speed.... kinda. --- neofetch | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index 2b2fd13c..7f6c404a 100755 --- a/neofetch +++ b/neofetch @@ -983,13 +983,18 @@ get_cpu() { "IRIX") # Get CPU name. - cpu="$(hinv -c | awk -F':' '/CPU:/ {printf $2}')" + cpu="$(hinv -c processor | awk -F':' '/CPU:/ {printf $2}')" # Get CPU speed. - cpu="$(hinv -c | awk 'NR==1{printf $2}')" + cpu="$(hinv -c processor | awk '/MHZ/ {printf $2}')" + + # Note: This is an inaccurate way to count CPU speed. + # Most of them use MHZ, I'm yet to see if they have + # anything above 1 GHZ. So this will have to do as a + # place holder. # Get CPU cores. - cores="$(sysconf NPROC_ONLN)" # Does this even work? + cores="$(sysconf NPROC_ONLN)" ;; esac @@ -1069,7 +1074,7 @@ get_cpu_usage() { "Haiku") cores="$(sysinfo -cpu | grep -c -F 'CPU #')" ;; "iPhone OS") cores="${cpu/*\(}"; cores="${cores/\)*}" ;; "AIX") cores="$(lparstat -i | awk -F':' '/Online Virtual CPUs/ {printf $2}')" ;; - "IRIX") cores="$(sysconf NPROC_ONLN)" # Does this even work? + "IRIX") cores="$(sysconf NPROC_ONLN)" esac fi From 86b309aeef203c784ac2ee315fbdb4a5cebc99c0 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 22 May 2017 22:16:37 +0700 Subject: [PATCH 16/43] CPU [IRIX]: Removed note Well, nevermind. Turns out I read the code the wrong way... --- neofetch | 5 ----- 1 file changed, 5 deletions(-) diff --git a/neofetch b/neofetch index 7f6c404a..49212352 100755 --- a/neofetch +++ b/neofetch @@ -988,11 +988,6 @@ get_cpu() { # Get CPU speed. cpu="$(hinv -c processor | awk '/MHZ/ {printf $2}')" - # Note: This is an inaccurate way to count CPU speed. - # Most of them use MHZ, I'm yet to see if they have - # anything above 1 GHZ. So this will have to do as a - # place holder. - # Get CPU cores. cores="$(sysconf NPROC_ONLN)" ;; From b88e86e8562fd7404baf934e0c463ea5d0aba1be Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 24 May 2017 11:42:38 +0700 Subject: [PATCH 17/43] Disk [IRIX]: Fewer LoCs --- neofetch | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/neofetch b/neofetch index 49212352..6f8e8bab 100755 --- a/neofetch +++ b/neofetch @@ -1840,13 +1840,8 @@ get_disk() { disk_perc="${disk_info[4]/'%'}" case "$df_version" in - *"befhikm"*) - disk="$((disk_info[2]/1024/1024))G / $((disk_info[2]/1024/1024))G (${disk_perc}%)" - ;; - - *) - disk="${disk_info[2]/i} / ${disk_info[1]/i} (${disk_perc}%)" - ;; + *"befhikm"*) disk="$((disk_info[2]/1024/1024))G / $((disk_info[2]/1024/1024))G (${disk_perc}%)" ;; + *) disk="${disk_info[2]/i} / ${disk_info[1]/i} (${disk_perc}%)" ;; esac # Subtitle. From 6cb37b91a71776417049d0d263aea8ba98ab51d9 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 24 May 2017 11:48:08 +0700 Subject: [PATCH 18/43] CPU [IRIX]: Fix speed --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 6f8e8bab..1c7b64ce 100755 --- a/neofetch +++ b/neofetch @@ -986,7 +986,7 @@ get_cpu() { cpu="$(hinv -c processor | awk -F':' '/CPU:/ {printf $2}')" # Get CPU speed. - cpu="$(hinv -c processor | awk '/MHZ/ {printf $2}')" + speed="$(hinv -c processor | awk '/MHZ/ {printf $2}')" # Get CPU cores. cores="$(sysconf NPROC_ONLN)" From 4364e67d6ccef059d95046bd97d338de9d968f4a Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 24 May 2017 12:00:44 +0700 Subject: [PATCH 19/43] Kernel [IRIX]: Better words --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 1c7b64ce..3491f5c3 100755 --- a/neofetch +++ b/neofetch @@ -322,7 +322,7 @@ get_title() { } get_kernel() { - # Since these OSes are integrated systems, it's better to skip this function altogether + # Since these OS are integrated systems, it's better to skip this function altogether [[ "$os" =~ (AIX|IRIX) ]] && return case "$kernel_shorthand" in From fd8f5145cbba314d6f03616065d5f49a05c7ae3d Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 9 Jun 2017 23:20:01 +0700 Subject: [PATCH 20/43] Disk [AIX df]: Changed df versioning detection --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 3491f5c3..fa0b2493 100755 --- a/neofetch +++ b/neofetch @@ -1818,7 +1818,7 @@ get_disk() { df_version="$(df --version 2>&1)" case "$df_version" in *"blocks"*) err "Your version of df cannot be used due to the non-standard flags" ; return ;; # Haiku - *"recognized flag"*) df_flags=(-P -g) ;; # AIX, untested + *"IMitv"*) df_flags=(-P -g) ;; # AIX *"befhikm"*) df_flags=(-P -k) ;; # IRIX *) df_flags=(-P -h) ;; esac From 3b82a89c248661cff51a44e4e78189ee3e09747c Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 10 Jun 2017 13:27:23 +0700 Subject: [PATCH 21/43] Distro [IRIX]: use -p for machine_arch --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 503fda16..7ba07634 100755 --- a/neofetch +++ b/neofetch @@ -223,7 +223,7 @@ get_distro() { # Get OS architecture. if [[ "$os_arch" == "on" ]]; then case "$os" in - "Solaris" | "AIX" | "BSD" | "Haiku") machine_arch="$(uname -p)" ;; + "Solaris" | "AIX" | "BSD" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;; *) machine_arch="$(uname -m)" ;; esac From 38f0ac6a84ca77846340831359f7099739c97902 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 20 Jun 2017 20:37:32 +0700 Subject: [PATCH 22/43] Disk [IRIX]: Fix Total Disk appears like used ones --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 7ba07634..f017b42d 100755 --- a/neofetch +++ b/neofetch @@ -1898,7 +1898,7 @@ get_disk() { disk_perc="${disk_info[4]/'%'}" case "$df_version" in - *"befhikm"*) disk="$((disk_info[2]/1024/1024))G / $((disk_info[2]/1024/1024))G (${disk_perc}%)" ;; + *"befhikm"*) disk="$((disk_info[2]/1024/1024))G / $((disk_info[1]/1024/1024))G (${disk_perc}%)" ;; *) disk="${disk_info[2]/i} / ${disk_info[1]/i} (${disk_perc}%)" ;; esac From 0b54a97c043b61091418d563013954e3e50a3856 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 20 Jun 2017 20:45:00 +0700 Subject: [PATCH 23/43] Misc: Add /usr/etc to PATH It seems IRIX needs to access /usr/etc to be able to access ifconfig. --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index f017b42d..69c5ed65 100755 --- a/neofetch +++ b/neofetch @@ -20,8 +20,8 @@ old_ifs="$IFS" export LC_ALL=C export LANG=C -# Add /usr/xpg4/bin, /usr/sbin, and /sbin to PATH. -export PATH="/usr/xpg4/bin:/usr/sbin:/sbin:${PATH}" +# Add /usr/xpg4/bin, /usr/sbin, /sbin, and /usr/etc to PATH. +export PATH="/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:${PATH}" # Set no case match. shopt -s nocasematch From 2837d9bed1fa6847b7a023be211fc4bcc3a7a4c6 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 20 Jun 2017 20:48:16 +0700 Subject: [PATCH 24/43] ASCII: Fix ASCII not appearing in IRIX64 systems --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 69c5ed65..3004bb2c 100755 --- a/neofetch +++ b/neofetch @@ -3486,7 +3486,7 @@ get_distro_colors() { ascii_file="solaris" ;; - "IRIX") + "IRIX"*) set_colors 4 7 ascii_file="irix" ;; From 3c03a8379ea27a694264786aafe3c536286715d5 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 20 Jun 2017 20:48:56 +0700 Subject: [PATCH 25/43] CPU [IRIX]: Remove unneeded output --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 3004bb2c..f37bf847 100755 --- a/neofetch +++ b/neofetch @@ -1046,6 +1046,7 @@ get_cpu() { cpu="${cpu//with Radeon * Graphics}" cpu="${cpu//, altivec supported}" cpu="${cpu//FPU*}" + cpu="${cpu//Chip Revision*}" # Trim spaces from core output cores="${cores//[[:space:]]}" From 1b2b93737ae29205f947ba59fe6f15874c8c15fb Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 20 Jun 2017 21:11:19 +0700 Subject: [PATCH 26/43] Docs: Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7a7690b..bd5e19f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ## Operating System +- Added support for IRIX. - Added support for Arch XFerience. **[@mstraube](https://github.com/mstraube)** - Added support for CloverOS. - Added support for Maui. **[@mstraube](https://github.com/mstraube)** From 3cef00ffa4c9d9e7a2e6d029e4433f758a8e4404 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 21 Jun 2017 00:15:05 +1000 Subject: [PATCH 27/43] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 198d8316..770f23ba 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Neofetch is a CLI system information tool written in BASH. Neofetch displays inf Neofetch is highly customizable through the use of command line flags or the user config file. There are over 50 config options to mess around with and there's the `print_info()` function and friends which let you add your own custom info. -Neofetch can be used on any OS that has BASH 3.2+, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`. +Neofetch can be used on any OS that has BASH 3.2+, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, `IRIX`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`. For more information: From 1c759e811999bb0d22f9da64f74912d70c1e385b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 21 Jun 2017 10:58:09 +1000 Subject: [PATCH 28/43] Release: 3.2.0 --- CHANGELOG.md | 4 +++- config/config | 2 +- neofetch | 2 +- neofetch.1 | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd5e19f0..24e77cc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,12 @@ - **[@MatthewCox](https://github.com/MatthewCox)** - **[@dawidd6](https://github.com/dawidd6)** - **[@erikdubois](https://github.com/erikdubois)** +- **[@konimex](https://github.com/konimex)** - **[@mstraube](https://github.com/mstraube)** - **[@Artoriuz](https://github.com/Artoriuz)** - **[@WilsonRU](https://github.com/WilsonRU)** - **[@Takeya-Yuki](https://github.com/Takeya-Yuki)** +- **[@iandrewt](https://github.com/iandrewt)** - **[@LER0ever](https://github.com/LER0ever)** @@ -23,7 +25,7 @@ - Minimum required BASH version is now 3.2. - (Neofetch has always used 3.2+ features, I've just made it obvious now in the documentation.) -- Fixed config file not being created. +- Fixed config file not being created on first install. ## Images diff --git a/config/config b/config/config index a1555503..b1e3c018 100644 --- a/config/config +++ b/config/config @@ -724,4 +724,4 @@ image_host="teknik" # # NOTE: Don't change this value, neofetch reads this to determine # how to handle backwards compatibility. -config_version="3.1.0-git" +config_version="3.2.0" diff --git a/neofetch b/neofetch index 6820ac2c..68a8a81b 100755 --- a/neofetch +++ b/neofetch @@ -9,7 +9,7 @@ # https://github.com/dylanaraps/ # Neofetch version. -version="3.1.0-git" +version="3.2.0" bash_version="${BASH_VERSION/.*}" sys_locale="${LANG:-C}" diff --git a/neofetch.1 b/neofetch.1 index a465054e..a1bebe85 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. -.TH NEOFETCH "1" "April 2017" "Neofetch 3.1.0-git" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. +.TH NEOFETCH "1" "June 2017" "Neofetch 3.2.0" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS From 36bae0815ef768f7c6017b06a367452ea9e87903 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 21 Jun 2017 11:06:13 +1000 Subject: [PATCH 29/43] General: Bump version to minor git --- CHANGELOG.md | 73 --------------------------------------------------- config/config | 2 +- neofetch | 2 +- neofetch.1 | 2 +- 4 files changed, 3 insertions(+), 76 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24e77cc4..8048c9eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,76 +1,3 @@ ## Contributors -- **[@MatthewCox](https://github.com/MatthewCox)** -- **[@dawidd6](https://github.com/dawidd6)** -- **[@erikdubois](https://github.com/erikdubois)** -- **[@konimex](https://github.com/konimex)** -- **[@mstraube](https://github.com/mstraube)** -- **[@Artoriuz](https://github.com/Artoriuz)** -- **[@WilsonRU](https://github.com/WilsonRU)** -- **[@Takeya-Yuki](https://github.com/Takeya-Yuki)** -- **[@iandrewt](https://github.com/iandrewt)** -- **[@LER0ever](https://github.com/LER0ever)** - -## Operating System - -- Added support for IRIX. -- Added support for Arch XFerience. **[@mstraube](https://github.com/mstraube)** -- Added support for CloverOS. -- Added support for Maui. **[@mstraube](https://github.com/mstraube)** -- Added support for KS Linux. **[@Takeya-Yuki](https://github.com/Takeya-Yuki)** - - -## General - -- Minimum required BASH version is now 3.2. - - (Neofetch has always used 3.2+ features, I've just made it obvious now in the documentation.) -- Fixed config file not being created on first install. - - -## Images - -- [w3m] Added `--loop` flag which makes Neofetch draw the image once per second. - - This is a workaround to the images disappearing on resize and workspace switch. - - Use Ctrl+C to exit. -- [w3m] Fixed w3m-img not found on FreeBSD 12. **[@Artoriuz](https://github.com/Artoriuz)** - - -## Ascii - -- Added Ubuntu-MATE ascii art. -- Fixed ArchLabs ascii art. **[@erikdubois](https://github.com/erikdubois)** -- Updated GoboLinux ascii art. **[@WilsonRU](https://github.com/WilsonRU)** -- Fixed `--ascii_distro windows10` not working. - - -## Info - -**Distro** - -- [Solaris, AIX, Haiku] The machine architecture will now be shown properly instead of machine ID. - -**Terminal Emulator** - -- Added support for Neovim terminal emulator. **[@LER0ever](https://github.com/LER0ever)** -- Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)** -- [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)** -- Use `$SSH_TTY` for terminal detection if machine is connected via SSH. -- Break from loop if PPID can't be accessed/not found. - -**GPU** - -- [Linux] Fixed GPU sort. - -**Song** - -- Do not detect ibus\* or indicator\* as player. **[@dawidd6](https://github.com/dawidd6)** - -**Model** - -- Specify when running on a Hackintosh. **[@LER0ever](https://github.com/LER0ever)** - - -**Memory** - -- [FreeBSD]: Fix inaccurate free memory calculation. diff --git a/config/config b/config/config index b1e3c018..78117864 100644 --- a/config/config +++ b/config/config @@ -724,4 +724,4 @@ image_host="teknik" # # NOTE: Don't change this value, neofetch reads this to determine # how to handle backwards compatibility. -config_version="3.2.0" +config_version="3.2.1-git" diff --git a/neofetch b/neofetch index 68a8a81b..539489ee 100755 --- a/neofetch +++ b/neofetch @@ -9,7 +9,7 @@ # https://github.com/dylanaraps/ # Neofetch version. -version="3.2.0" +version="3.2.1-git" bash_version="${BASH_VERSION/.*}" sys_locale="${LANG:-C}" diff --git a/neofetch.1 b/neofetch.1 index a1bebe85..96dc4344 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. -.TH NEOFETCH "1" "June 2017" "Neofetch 3.2.0" "User Commands" +.TH NEOFETCH "1" "June 2017" "Neofetch 3.2.1-git" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS From 681208fa21be325caed7a2d9586333a4322a5095 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 22 Jun 2017 04:04:47 +0700 Subject: [PATCH 30/43] Distro: Get $machine_arch case outside the if statement So if $os_arch=off, then the machine_arch will still be populated. --- neofetch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 539489ee..7c3ab813 100755 --- a/neofetch +++ b/neofetch @@ -221,12 +221,12 @@ get_distro() { [[ -z "$distro" ]] && distro="$os (Unknown)" # Get OS architecture. - if [[ "$os_arch" == "on" ]]; then - case "$os" in - "Solaris" | "AIX" | "BSD" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;; - *) machine_arch="$(uname -m)" ;; + case "$os" in + "Solaris" | "AIX" | "BSD" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;; + *) machine_arch="$(uname -m)" ;; - esac + esac + if [[ "$os_arch" == "on" ]]; then distro+=" ${machine_arch}" fi From 45d78359a7540ec890df826fc11c0e88a603a17a Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 22 Jun 2017 04:18:33 +0700 Subject: [PATCH 31/43] CPU [Linux]: Fix inaccurate ARM CPU on SoC systems --- neofetch | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/neofetch b/neofetch index 7c3ab813..13bef3cb 100755 --- a/neofetch +++ b/neofetch @@ -828,26 +828,22 @@ get_cpu() { case "$os" in "Linux" | "MINIX" | "Windows") # Get CPU name. - case "$distro" in - "Android"*) cpu="$(getprop ro.product.board)" ;; - *) - case "$machine_arch" in - "frv" | "hppa" | "m68k" | "openrisc" | "or"* | "powerpc" | "ppc"* | "sparc"*) - cpu="$(awk -F':' '/^cpu\t|^CPU/ {printf $2; exit}' /proc/cpuinfo)" - ;; - "s390"*) - cpu="$(awk -F'=' '/machine/ {print $4; exit}' /proc/cpuinfo)" - ;; - "ia64" | "m32r") - cpu="$(awk -F':' '/model/ {print $2; exit}' /proc/cpuinfo)" - [[ -z "$cpu" ]] && cpu="$(awk -F':' '/family/ {printf $2; exit}' /proc/cpuinfo)" - ;; - *) - cpu="$(awk -F ': | @' '/model name|Processor|^cpu model|chip type|^cpu type/ {printf $2; exit}' /proc/cpuinfo)" - ;; - esac - ;; - esac + case "$machine_arch" in + "frv" | "hppa" | "m68k" | "openrisc" | "or"* | "powerpc" | "ppc"* | "sparc"*) + cpu="$(awk -F':' '/^cpu\t|^CPU/ {printf $2; exit}' /proc/cpuinfo)" + ;; + "s390"*) + cpu="$(awk -F'=' '/machine/ {print $4; exit}' /proc/cpuinfo)" + ;; + "ia64" | "m32r") + cpu="$(awk -F':' '/model/ {print $2; exit}' /proc/cpuinfo)" + [[ -z "$cpu" ]] && cpu="$(awk -F':' '/family/ {printf $2; exit}' /proc/cpuinfo)" + ;; + *) + cpu="$(awk -F ': | @' '/model name|Processor|^cpu model|chip type|^cpu type/ {printf $2; exit}' /proc/cpuinfo)" + [[ "$cpu" == *"processor rev"* ]] && cpu="$(awk -F':' '/Hardware/ {print $2; exit}' /proc/cpuinfo)" + ;; + esac speed_dir="/sys/devices/system/cpu/cpu0/cpufreq" temp_dir="/sys/class/hwmon/hwmon0/temp1_input" @@ -1047,6 +1043,7 @@ get_cpu() { cpu="${cpu//, altivec supported}" cpu="${cpu//FPU*}" cpu="${cpu//Chip Revision*}" + cpu="${cpu//Technologies, Inc}" # Trim spaces from core output cores="${cores//[[:space:]]}" @@ -1068,6 +1065,7 @@ get_cpu() { cpu="${cpu/AMD }" cpu="${cpu/Intel }" cpu="${cpu/Core? Duo }" + cpu="${cpu/Qualcomm }" [[ "$cpu_shorthand" == "tiny" ]] && cpu="${cpu/@*}" ;; From 633a05175d2a6e441ba3aa45b2f372a748bfd584 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 22 Jun 2017 12:53:37 +0700 Subject: [PATCH 32/43] Docs: Changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8048c9eb..20ddd834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ ## Contributors +## Info + +**CPU** + +- [Linux] Fixed inaccurate output on ARM SoC devices. From 789ff58583f2d31cc85e2a7c1242653aa10c3efb Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 22 Jun 2017 01:16:24 +0700 Subject: [PATCH 33/43] Model [AIX]: Reduce dependency on prtconf --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 13bef3cb..b5b3ab70 100755 --- a/neofetch +++ b/neofetch @@ -316,7 +316,7 @@ get_model() { ;; "AIX") - model="$(prtconf | awk -F':' '/System Model/ {printf $2}')" + model="$(/usr/bin/uname -M)" ;; esac From 2c11f83b2b91f672757ef5db12d0dcdc419b965e Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 22 Jun 2017 01:21:44 +0700 Subject: [PATCH 34/43] CPU [AIX]: Use prtconf -s for faster speed output --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index b5b3ab70..bff2c23b 100755 --- a/neofetch +++ b/neofetch @@ -990,7 +990,7 @@ get_cpu() { cpu="$(prtconf | awk -F':' '/Processor Type/ {printf $2}')" # Get CPU speed. - speed="$(prtconf | awk -F':' '/Processor Clock Speed/ {printf $2}')" + speed="$(prtconf -s | awk -F':' '{printf $2}')" speed="${speed/MHz}" # Get CPU cores. From 0fa5e771240e6ec214e370a3f300fc3cf9e491bb Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 22 Jun 2017 12:58:16 +0700 Subject: [PATCH 35/43] CPU [AIX]: Use lsattr instead of prtconf for faster output --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index bff2c23b..c28d8d2f 100755 --- a/neofetch +++ b/neofetch @@ -987,7 +987,7 @@ get_cpu() { "AIX") # Get CPU name. - cpu="$(prtconf | awk -F':' '/Processor Type/ {printf $2}')" + cpu="$(lsattr -El proc0 -a type | awk '{printf $2}')" # Get CPU speed. speed="$(prtconf -s | awk -F':' '{printf $2}')" From d57806c95fed4b6c460b2cfb0624b10169e22584 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 28 Jun 2017 06:38:05 +0700 Subject: [PATCH 36/43] Term (SSH): Break from loop regardless of $SSH_TTY output Fixes #760 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index c28d8d2f..893b1258 100755 --- a/neofetch +++ b/neofetch @@ -1686,7 +1686,7 @@ get_term() { # Check $PPID for terminal emulator. while [[ -z "$term" ]]; do if [[ "$SSH_CONNECTION" ]]; then - term="$SSH_TTY" + term="$SSH_TTY"; break else parent="$(get_ppid "$parent")" [[ -z "$parent" ]] && break From 6a483c1ad59abbf7775c92e28142d637bf7796e0 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 28 Jun 2017 06:57:40 +0700 Subject: [PATCH 37/43] Docs: Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20ddd834..2d75db1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,3 +6,7 @@ **CPU** - [Linux] Fixed inaccurate output on ARM SoC devices. + +**Terminal** + +- [SSH] Fixed infinite loop if neofetch is run on non-interactive shells. From 69deb4309d6b5c220f931584851e0434d5138d3b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 30 Jun 2017 13:59:19 +1000 Subject: [PATCH 38/43] Image: Possibly fix xterm 1/0 error. --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 893b1258..eb8b7d2f 100755 --- a/neofetch +++ b/neofetch @@ -2404,7 +2404,7 @@ get_term_size() { fi # Get terminal width/height if \033[14t is unsupported. - if [[ -z "$term_width" ]]; then + if [[ -z "$term_width" ]] || (( "$term_width" < 50 )); then if type -p xdotool >/dev/null 2>&1; then current_window="$(xdotool getactivewindow)" source <(xdotool getwindowgeometry --shell "$current_window") From fec940483cc4e267e3252505859623ff4fbf04f0 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 30 Jun 2017 14:04:55 +1000 Subject: [PATCH 39/43] docs: CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d75db1a..c21a0895 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,3 +10,8 @@ **Terminal** - [SSH] Fixed infinite loop if neofetch is run on non-interactive shells. + + +## Images + +- Fixed division by 0 error in XTerm. From b0a0454f52a53ebf448016bdbe9e2eb1a9626022 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 30 Jun 2017 13:36:56 +0700 Subject: [PATCH 40/43] 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 41/43] 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 42/43] 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 43/43] 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