From 3025c2a8c47ef0ad4bbcc47c6aba98a3982ea700 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Fri, 28 Apr 2017 11:24:30 +1000 Subject: [PATCH 01/50] General: Bash version docs --- CHANGELOG.md | 6 ++++++ README.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19b08256..1cadb737 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ - **[@dawidd6](https://github.com/dawidd6)** +## 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.) + + ## Images - [w3m] Added `--loop` flag which makes Neofetch draw the image once per second. diff --git a/README.md b/README.md index fd7d6d2e..198d8316 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, 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`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`. For more information: From 38b705dd59c68420922f24d8d5b63e4cfa75542a Mon Sep 17 00:00:00 2001 From: Erik Dubois Date: Fri, 28 Apr 2017 13:32:53 +0200 Subject: [PATCH 02/50] tip of archlabs is not in the middle added a few spaces to have the tip "sy" in the middle of the logo --- ascii/distro/archlabs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ascii/distro/archlabs b/ascii/distro/archlabs index e81e70a9..8e0b840e 100644 --- a/ascii/distro/archlabs +++ b/ascii/distro/archlabs @@ -1,4 +1,4 @@ -${c1} sy +${c1} sy h--d d---: :----/N @@ -15,4 +15,4 @@ ${c1} sy /--::::::::::::dd::::::::::+N :-:::/+syhd NNN N dhys+/:::/ d::+ydN /s+/d -hsd y\\. +arc y\\. From fe3da7e0b83769add20a6e2487442be88fbaa185 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 28 Apr 2017 22:05:16 +1000 Subject: [PATCH 03/50] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cadb737..f126cf5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - **[@MatthewCox](https://github.com/MatthewCox)** - **[@dawidd6](https://github.com/dawidd6)** +- **[@erikdubois](https://github.com/erikdubois)** ## General @@ -17,6 +18,11 @@ - Use Ctrl+C to exit. +## Ascii + +- Fixed ArchLabs ascii art. **[@erikdubois](https://github.com/erikdubois)** + + ## Info **Terminal Emulator** From def8123c46997c414191e0ab8a708ded466d85de Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 1 May 2017 15:05:40 +0700 Subject: [PATCH 04/50] Misc: Use fallback values for some functions --- neofetch | 92 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/neofetch b/neofetch index b85745f3..ff7a71d6 100755 --- a/neofetch +++ b/neofetch @@ -1173,7 +1173,16 @@ get_gpu() { esac ;; - "BSD" | "Solaris" | "MINIX" | "AIX") + "Windows") + gpu="$(wmic path Win32_VideoController get caption)" + gpu="${gpu//Caption}" + ;; + + "Haiku") + gpu="$(listdev | grep -A2 -F 'device Display controller' | awk -F':' '/device beef/ {print $2}')" + ;; + + *) case "$kernel_name" in "FreeBSD"* | "DragonFly"*) gpu="$(pciconf -lv | grep -B 4 -F "VGA" | grep -F "device")" @@ -1187,15 +1196,6 @@ get_gpu() { ;; esac ;; - - "Windows") - gpu="$(wmic path Win32_VideoController get caption)" - gpu="${gpu//Caption}" - ;; - - "Haiku") - gpu="$(listdev | grep -A2 -F 'device Display controller' | awk -F':' '/device beef/ {print $2}')" - ;; esac if [[ "$gpu_brand" == "off" ]]; then @@ -1394,19 +1394,6 @@ get_song() { get_resolution() { case "$os" in - "Linux" | "BSD" | "Solaris" | "MINIX" | "AIX") - if type -p xrandr >/dev/null; then - case "$refresh_rate" in - "on") resolution="$(xrandr --nograb --current | awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;; - "off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;; - esac - resolution="${resolution//\*}" - - elif type -p xdpyinfo >/dev/null; then - resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')" - fi - ;; - "Mac OS X") if type -p screenresolution >/dev/null; then resolution="$(screenresolution get 2>&1 | awk '/Display/ {printf $6 "Hz, "}')" @@ -1451,6 +1438,19 @@ get_resolution() { [[ "$refresh_rate" == "off" ]] && resolution="${resolution/ @*}" ;; + + *) + if type -p xrandr >/dev/null; then + case "$refresh_rate" in + "on") resolution="$(xrandr --nograb --current | awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;; + "off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;; + esac + resolution="${resolution//\*}" + + elif type -p xdpyinfo >/dev/null; then + resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')" + fi + ;; esac resolution="${resolution%,*}" @@ -2192,7 +2192,29 @@ get_image_source() { get_wallpaper() { case "$os" in - "Linux" | "BSD" | "Solaris" | "MINIX" | "AIX") + "Mac OS X") + image="$(osascript -e 'tell application "System Events" to picture of current desktop')" + ;; + + "Windows") + case "$distro" in + "Windows XP") + case "$kernel_name" in + "CYGWIN"*) image="/cygdrive/c/Documents and Settings/${USER}" ;; + "MSYS2"* | "MINGW*") image="/c/Documents and Settings/${USER}" ;; + esac + image+="/Local Settings/Application Data/Microsoft" + image+="/Wallpaper1.bmp" + ;; + + "Windows"*) + image="$APPDATA/Microsoft/Windows/Themes" + image+="/TranscodedWallpaper.jpg" + ;; + esac + ;; + + *) # Get DE if user has disabled the function. ((de_run != 1)) && get_de @@ -2223,28 +2245,6 @@ get_wallpaper() { image="${image/'file://'}" image="$(trim_quotes "$image")" ;; - - "Mac OS X") - image="$(osascript -e 'tell application "System Events" to picture of current desktop')" - ;; - - "Windows") - case "$distro" in - "Windows XP") - case "$kernel_name" in - "CYGWIN"*) image="/cygdrive/c/Documents and Settings/${USER}" ;; - "MSYS2"* | "MINGW*") image="/c/Documents and Settings/${USER}" ;; - esac - image+="/Local Settings/Application Data/Microsoft" - image+="/Wallpaper1.bmp" - ;; - - "Windows"*) - image="$APPDATA/Microsoft/Windows/Themes" - image+="/TranscodedWallpaper.jpg" - ;; - esac - ;; esac # If image is an xml file, don't use it. From 3242425c4f856c2f86149fab723705a0856c8682 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Thu, 27 Apr 2017 10:04:56 +0200 Subject: [PATCH 05/50] Term: Add font support for mate-terminal --- neofetch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/neofetch b/neofetch index b85745f3..ece7e2cd 100755 --- a/neofetch +++ b/neofetch @@ -1734,6 +1734,34 @@ get_term_font() { [[ "$profile_filename" ]] && term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")" ;; + "mate-terminal") + # To get the actual config we have to create a temporarily file with the --save-config option. + mateterm_config="/tmp/mateterm.cfg" + + # Ensure /tmp exists and we do not overwrite anything. + if [[ -d /tmp && ! -f "$mateterm_config" ]]; then + mate-terminal --save-config="$mateterm_config" + + role="$(xprop -id "${WINDOWID}" WM_WINDOW_ROLE)" + role="${role##*= }" + + term_id="$(grep -A1 "${role//\"}" "$mateterm_config")" + term_id="${term_id##*=}" + + profile="$(grep -A1 "\[$term_id\]" "$mateterm_config")" + profile="${profile##*=}" + + rm -f "$mateterm_config" + + if [[ "$(gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/"${profile}"/ use-system-font)" == "true" ]]; then + term_font="$(gsettings get org.mate.interface monospace-font-name)" + else + term_font="$(gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/"${profile}"/ font)" + fi + term_font="$(trim_quotes "$term_font")" + fi + ;; + "mintty") term_font="$(awk -F '=' '!/^($|#)/ && /Font/ {printf $2; exit}' "${HOME}/.minttyrc")" ;; From 4718dedd3145e49a694de98a27cdd523087b7af2 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 3 May 2017 20:27:27 +1000 Subject: [PATCH 06/50] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f126cf5d..f3fbc91a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - **[@MatthewCox](https://github.com/MatthewCox)** - **[@dawidd6](https://github.com/dawidd6)** - **[@erikdubois](https://github.com/erikdubois)** +- **[@mstraube](https://github.com/mstraube)** ## General @@ -27,6 +28,7 @@ **Terminal Emulator** +- Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)** - [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)** **GPU** From 7646a76d021aaece3f2cda719a93ec5bd0f42ebf Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 4 May 2017 08:51:06 +1000 Subject: [PATCH 07/50] Ascii: Add ubuntu-mate ascii, closes #712 --- ascii/distro/ubuntu-mate | 20 ++++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 ascii/distro/ubuntu-mate diff --git a/ascii/distro/ubuntu-mate b/ascii/distro/ubuntu-mate new file mode 100644 index 00000000..893389fe --- /dev/null +++ b/ascii/distro/ubuntu-mate @@ -0,0 +1,20 @@ +${c1} `:+shmNNMMNNmhs+:` + .odMMMMMMMMMMMMMMMMMMdo. + /dMMMMMMMMMMMMMMMmMMMMMMMMd/ + :mMMMMMMMMMMMMNNNNM/`/yNMMMMMMm: + `yMMMMMMMMMms:..-::oM: -omMMMMMy` + `dMMMMMMMMy-.odNMMMMMM: -odMMMMMMd` + hMMMMMMMm-.hMMy/....+M:`/yNm+mMMMMMMMh +/MMMMNmMN-:NMy`-yNMMMMMmNyyMN:`dMMMMMMM/ +hMMMMm -odMMh`sMMMMMMMMMMs sMN..MMMMMMMh +NMMMMm `/yNMMMMMMMMMMMM: MM+ mMMMMMMN +NMMMMm `/yNMMMMMMMMMMMM: MM+ mMMMMMMN +hMMMMm -odMMh sMMMMMMMMMMs oMN..MMMMMMMh +/MMMMNNMN-:NMy`-yNMMMMMNNsyMN:`dMMMMMMM/ + hMMMMMMMm-.hMMy/....+M:.+hNd+mMMMMMMMh + `dMMMMMMMMy-.odNMMMMMM: :smMMMMMMd` + yMMMMMMMMMms/..-::oM: .+dMMMMMy + :mMMMMMMMMMMMMNNNNM: :smMMMMMMm: + /dMMMMMMMMMMMMMMMdNMMMMMMMd/ + .odMMMMMMMMMMMMMMMMMMdo. + `:+shmNNMMNNmhs+:` diff --git a/neofetch b/neofetch index ef270078..9a233032 100755 --- a/neofetch +++ b/neofetch @@ -3329,6 +3329,11 @@ get_distro_colors() { ascii_file="ubuntu-gnome" ;; + "Ubuntu-MATE"*) + set_colors 2 7 + ascii_file="ubuntu-mate" + ;; + "ubuntu_old") set_colors 1 7 3 ascii_file="ubuntu_old" From abaf8808fe47e658e71d19791a4b78af07b66c58 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 4 May 2017 08:51:49 +1000 Subject: [PATCH 08/50] Docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3fbc91a..e7fd764d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ ## Ascii +- Added Ubuntu-MATE ascii art. - Fixed ArchLabs ascii art. **[@erikdubois](https://github.com/erikdubois)** From d9d7b79d726431eab8b6693b2cba12870b8b87b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Vitor=20Rafael=20Chris=C3=B3stomo?= Date: Fri, 5 May 2017 22:15:19 -0300 Subject: [PATCH 09/50] Patch to make w3m image backend work on FreeBSD 11 Just an extra possible directory to search for w3m-img before outputting that it wasn't found on the system. --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 9a233032..f967eb9a 100755 --- a/neofetch +++ b/neofetch @@ -2292,7 +2292,10 @@ get_w3m_img_path() { elif [[ -x "/usr/libexec64/w3m/w3mimgdisplay" ]]; then w3m_img_path="/usr/libexec64/w3m/w3mimgdisplay" - + + elif [[ -x "/usr/local/libexec/w3m/w3mimgdisplay" ]]; then + w3m_img_path="/usr/local/libexec/w3m/w3mimgdisplay" + else err "Image: w3m-img wasn't found on your system" fi From 2134176de2df0dd1d893cc670b2fcb11d4dc4ae0 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 6 May 2017 15:12:26 +1000 Subject: [PATCH 10/50] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7fd764d..c4bb4885 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - **[@dawidd6](https://github.com/dawidd6)** - **[@erikdubois](https://github.com/erikdubois)** - **[@mstraube](https://github.com/mstraube)** +- **[@Artoriuz](https://github.com/Artoriuz)** ## General @@ -17,6 +18,7 @@ - [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 From 8572cf9a0888e1d68428be882d755e5c23a7698e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 7 May 2017 09:55:24 +1000 Subject: [PATCH 11/50] W3m: Fix zws --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 9a233032..cabe0bb2 100755 --- a/neofetch +++ b/neofetch @@ -2530,7 +2530,7 @@ display_image() { printf "%b\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$image\n4;\n3;" |\ "${w3m_img_path:-false}" -bg "$background_color" >/dev/null & 2>&1 || to_off "Image: w3m-img failed to display the image." - zws="​ " + zws="\xE2\x80\x8B\x20" ;; esac } @@ -2737,11 +2737,11 @@ get_underline() { get_line_break() { # Print it directly. - printf "%s\n" "${zws}" + printf "%b\n" "${zws}" # Calculate info height. ((++info_height)) - line_breaks+=$'\n' + line_breaks+="\n" # Tell info() that we printed manually. prin=1 From 41e61fd4415568d0424561c0a5aafc03549793b9 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Mon, 8 May 2017 16:44:13 +0200 Subject: [PATCH 12/50] OS: Add support for Arch XFerience --- ascii/distro/arch_xferience | 19 +++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 ascii/distro/arch_xferience diff --git a/ascii/distro/arch_xferience b/ascii/distro/arch_xferience new file mode 100644 index 00000000..f1757f92 --- /dev/null +++ b/ascii/distro/arch_xferience @@ -0,0 +1,19 @@ +${c1} ``--:::::::-.` + .-/+++ooooooooo+++:-` + `-/+oooooooooooooooooo++:. + -/+oooooo/+ooooooooo+/ooo++:` + `/+oo++oo. .+oooooo+.-: +:-o+- + `/+o/. -o. :oooooo+ ```:.+oo+- +`:+oo- -/` :oooooo+ .`-`+oooo/. +.+ooo+. .` `://///+-+..oooooo+:` +-+ooo:` ``.-+oooooo+/` +-+oo/` :+oooo/. +.+oo: ..-/. . -+oo+/` +`/++- -:::++::/. -+oo+- + ./o: `:///+- `./ooo+:` + .++- `` /-` -:/+oooo+:` + .:+/:`` `-:ooooooo++- + ./+o+//:...../+oooooooo++:` + `:/++ooooooooooooo++/-` + `.-//++++++//:-.` + `````` diff --git a/neofetch b/neofetch index 9a233032..89c48681 100755 --- a/neofetch +++ b/neofetch @@ -2864,6 +2864,11 @@ get_distro_colors() { ascii_file="archlabs" ;; + *"XFerience"*) + set_colors 6 6 7 1 + ascii_file="arch_xferience" + ;; + "Arch"*) set_colors 6 6 7 1 ascii_file="arch" From a9e1d91f3f84a6a13ed57c08b59f0c3b7402f058 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 9 May 2017 07:54:50 +1000 Subject: [PATCH 13/50] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4bb4885..9e603f5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ - **[@Artoriuz](https://github.com/Artoriuz)** +## Operating System + +- Added support for Arch XFerience. **[@mstraube](https://github.com/mstraube)** + + ## General - Minimum required BASH version is now 3.2. From bd67ad1a50c7cdca6b0fd4494e26bcdee1ee634e Mon Sep 17 00:00:00 2001 From: Wilson Moura Date: Wed, 10 May 2017 15:34:17 -0300 Subject: [PATCH 14/50] Update gobolinux art --- ascii/distro/gobolinux | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/ascii/distro/gobolinux b/ascii/distro/gobolinux index cf005eb9..276d4eaa 100644 --- a/ascii/distro/gobolinux +++ b/ascii/distro/gobolinux @@ -1,13 +1,6 @@ -${c1}+Nhsssss. `MM: -${c2}MM/ ./:::/- `MMo::// ./:::/- -MM/-osdd-+mm---hNs`MM+--/Md.omd---dmo -${c3}MM/ `MM:sMm yMh`MM: .MM-yMh hMy -mM+..-MM:oNm...hNy`MM/..:Mm.sNd...dNs -${c4}`+++++oo.`-o++++:``oo++++o` `:o+++o:` - -${c1}oo- :o+ -${c2}MM/ /yo -MM/ +mh mmyoosm/`+mh omy`od+..+mo -${c3}MM/ sMm MM/ `MM:sMm yMh -dmmm: -MM/ sMm MM/ `MM:sMm yMh .hNNm. -${c4}MMhsssss.sMm MM/ `MM:-yNsssmMh`sNs-.sMs +${c3} _____ _ +${c3} / ____| | | +${c3} | | __ ___ | |__ ___ +${c3} | | |_ |/ _ \| '_ \ / _ \ +${c3} | |__| | (_) | |_) | (_) | +${c3} \_____|\___/|_.__/ \___/ \ No newline at end of file From 2de3a35933a1b3042314cb99382afba8dd4aa768 Mon Sep 17 00:00:00 2001 From: Wilson Moura Date: Wed, 10 May 2017 15:38:33 -0300 Subject: [PATCH 15/50] Update Art --- ascii/distro/gobolinux | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ascii/distro/gobolinux b/ascii/distro/gobolinux index 276d4eaa..a2afa8c6 100644 --- a/ascii/distro/gobolinux +++ b/ascii/distro/gobolinux @@ -1,6 +1,6 @@ -${c3} _____ _ -${c3} / ____| | | -${c3} | | __ ___ | |__ ___ -${c3} | | |_ |/ _ \| '_ \ / _ \ -${c3} | |__| | (_) | |_) | (_) | -${c3} \_____|\___/|_.__/ \___/ \ No newline at end of file +${c1} _____ _ +/ ____| | | +| | __ ___ | |__ ___ +| | |_ |/ _ \| '_ \ / _ \ +| |__| | (_) | |_) | (_) | + \_____|\___/|_.__/ \___/ From cb98562519c760fcce28559f7e03976920d31a95 Mon Sep 17 00:00:00 2001 From: Wilson Moura Date: Wed, 10 May 2017 15:43:26 -0300 Subject: [PATCH 16/50] Update --- ascii/distro/gobolinux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ascii/distro/gobolinux b/ascii/distro/gobolinux index a2afa8c6..443cfbca 100644 --- a/ascii/distro/gobolinux +++ b/ascii/distro/gobolinux @@ -1,4 +1,4 @@ -${c1} _____ _ +${c1}_____ _ / ____| | | | | __ ___ | |__ ___ | | |_ |/ _ \| '_ \ / _ \ From 762820f13695e09d5064e3b66e652460986a775e Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 12 May 2017 18:42:04 +0200 Subject: [PATCH 17/50] OS: Add support for Maui --- ascii/distro/maui | 20 ++++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 ascii/distro/maui diff --git a/ascii/distro/maui b/ascii/distro/maui new file mode 100644 index 00000000..1ab9c07d --- /dev/null +++ b/ascii/distro/maui @@ -0,0 +1,20 @@ +${c1} `.-://////:--` + .:/oooooooooooooooo+:. + `:+ooooooooooooooooooooooo:` + `:oooooooooooooooooooooooooooo/` + ..```-oooooo/-`` `:oooooo+:.` `-- + :. +oo+-` /ooo/` -/ + -o. `o+- +o/` -o: +`oo` ::` :o/ `+. .+o` /oo. +/o+ . -+oo- ` /oo/ `ooo/ ++o- /ooo+` .+ooo. :ooo+ +++ .+oooo: -oooo+ `oooo+ +:. .oooooo` :ooooo- :oooo: +` .oooooo: :ooooo+ `ooo+-` + .+oooooo` -oooooo: `o/- + +oooooo: .ooooooo. + /ooooooo` /ooooooo/ .. + `:oooooooo/:::/ooooooooo+:--:/:` + `:+oooooooooooooooooooooo+:` + .:+oooooooooooooooo+:. + `.-://////:-.` diff --git a/neofetch b/neofetch index 498dfb6b..05fb8fc2 100755 --- a/neofetch +++ b/neofetch @@ -3102,6 +3102,11 @@ get_distro_colors() { ascii_file="manjaro" ;; + "Maui"*) + set_colors 6 7 + ascii_file="maui" + ;; + "Mer"*) set_colors 4 7 1 ascii_file="mer" From d5b263747d29ae5bad0bd6b64187ff10ceb4b548 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 13 May 2017 10:51:47 +1000 Subject: [PATCH 18/50] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e603f5c..40f9fd89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ## Operating System - Added support for Arch XFerience. **[@mstraube](https://github.com/mstraube)** +- Added support for Maui. **[@mstraube](https://github.com/mstraube)** ## General From 256828995d36ece43abccdbaf5b9e40a40d516ac Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 13 May 2017 14:12:28 +1000 Subject: [PATCH 19/50] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40f9fd89..fbc73a43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - **[@erikdubois](https://github.com/erikdubois)** - **[@mstraube](https://github.com/mstraube)** - **[@Artoriuz](https://github.com/Artoriuz)** +- **[@WilsonRU](https://github.com/WilsonRU)** ## Operating System @@ -31,6 +32,7 @@ - Added Ubuntu-MATE ascii art. - Fixed ArchLabs ascii art. **[@erikdubois](https://github.com/erikdubois)** +- Updated GoboLinux ascii art. **[@WilsonRU](https://github.com/WilsonRU)** ## Info From 0c602800f5ed6d25cfe50272444cd488cf0df257 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 18 May 2017 09:52:34 +1000 Subject: [PATCH 20/50] Ascii: Fix ascii_distro and windows10, closes #725 --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 05fb8fc2..da64c02e 100755 --- a/neofetch +++ b/neofetch @@ -2292,10 +2292,10 @@ get_w3m_img_path() { elif [[ -x "/usr/libexec64/w3m/w3mimgdisplay" ]]; then w3m_img_path="/usr/libexec64/w3m/w3mimgdisplay" - + elif [[ -x "/usr/local/libexec/w3m/w3mimgdisplay" ]]; then w3m_img_path="/usr/local/libexec/w3m/w3mimgdisplay" - + else err "Image: w3m-img wasn't found on your system" fi @@ -3372,7 +3372,7 @@ get_distro_colors() { ascii_file="void" ;; - *"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"*) + *"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"* | "windows10" | "windows8" ) set_colors 6 7 ascii_file="windows10" ;; From 39cb9247904ddf7164b498dd8edba83e396aaa1b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 18 May 2017 09:56:54 +1000 Subject: [PATCH 21/50] Docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbc73a43..6b80a93a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ - 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 From 10527026fe32bfb409c3f20b43e57f03fbc65d1a Mon Sep 17 00:00:00 2001 From: Takeya Yuki Date: Thu, 18 May 2017 08:47:46 +0800 Subject: [PATCH 22/50] Add KSLinux Support --- ascii/distro/ks | 11 +++++++++++ neofetch | 23 ++++++++++++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 ascii/distro/ks diff --git a/ascii/distro/ks b/ascii/distro/ks new file mode 100644 index 00000000..53385bd8 --- /dev/null +++ b/ascii/distro/ks @@ -0,0 +1,11 @@ +${c1} K K U U RRRR ooo + K K U U R R o o + KKK U U RRRR o o + K K U U R R o o + K K UUU R R ooo + +${c2} SSS AAA W W AAA + S A A W W A A + SSS AAAAA W W W AAAAA + S A A WW WW A A + SSS A A W W A A diff --git a/neofetch b/neofetch index da64c02e..b1156ef6 100755 --- a/neofetch +++ b/neofetch @@ -102,7 +102,8 @@ get_distro() { elif type -p tazpkg >/dev/null; then distro="SliTaz $(< /etc/slitaz-release)" - + elif type -p kpm > /dev/null; then + distro="KSLinux" elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then distro="Android $(getprop ro.build.version.release)" @@ -434,6 +435,8 @@ get_packages() { type -p dpkg >/dev/null && \ packages="$((packages+=$(dpkg --get-selections | grep -cv deinstall$)))" + type -p kpm >/dev/null && \ + packages="$((packages+=$(kpm --get-selections | grep -cv deinstall$)))" type -p pkgtool >/dev/null && \ packages="$((packages+=$(ls -1 /var/log/packages | wc -l)))" @@ -1633,8 +1636,13 @@ get_term() { # Check $PPID for terminal emulator. while [[ -z "$term" ]]; do parent="$(get_ppid "$parent")" - name="$(get_process_name "$parent")" + if [ $parent -lt 2 ]; then + parent=1 + term="kernel shell on $(tty)" + fi + name="$(get_process_name "$parent")" + case "${name// }" in "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; @@ -2292,10 +2300,10 @@ get_w3m_img_path() { elif [[ -x "/usr/libexec64/w3m/w3mimgdisplay" ]]; then w3m_img_path="/usr/libexec64/w3m/w3mimgdisplay" - + elif [[ -x "/usr/local/libexec/w3m/w3mimgdisplay" ]]; then w3m_img_path="/usr/local/libexec/w3m/w3mimgdisplay" - + else err "Image: w3m-img wasn't found on your system" fi @@ -3067,6 +3075,11 @@ get_distro_colors() { ascii_file="korora" ;; + "KSLinux"*) + set_colors 4 7 1 + ascii_file="ks" + ;; + "Kubuntu"*) set_colors 4 7 1 ascii_file="kubuntu" @@ -3372,7 +3385,7 @@ get_distro_colors() { ascii_file="void" ;; - *"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"* | "windows10" | "windows8" ) + *"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"*) set_colors 6 7 ascii_file="windows10" ;; From 62952a1f5683ba1d3bcf9d89699ae07615445e0b Mon Sep 17 00:00:00 2001 From: Yuki Takeya Date: Thu, 18 May 2017 12:02:13 +0900 Subject: [PATCH 23/50] Fix Build --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index b1156ef6..a5502f38 100755 --- a/neofetch +++ b/neofetch @@ -1636,7 +1636,7 @@ get_term() { # Check $PPID for terminal emulator. while [[ -z "$term" ]]; do parent="$(get_ppid "$parent")" - if [ $parent -lt 2 ]; then +       if [ "$parent" -lt 2 ]; then parent=1 term="kernel shell on $(tty)" fi @@ -4322,4 +4322,4 @@ main() { return 0 } -main "$@" +main "$@" \ No newline at end of file From 7e176284a7aef6e58258f2024b80ad28c91edd5b Mon Sep 17 00:00:00 2001 From: Takeya Yuki Date: Thu, 18 May 2017 14:47:02 +0800 Subject: [PATCH 24/50] Fix Some Bugs --- ascii/distro/{ks => kslinux} | 0 neofetch | 7 +++++-- 2 files changed, 5 insertions(+), 2 deletions(-) rename ascii/distro/{ks => kslinux} (100%) diff --git a/ascii/distro/ks b/ascii/distro/kslinux similarity index 100% rename from ascii/distro/ks rename to ascii/distro/kslinux diff --git a/neofetch b/neofetch index a5502f38..10296eb9 100755 --- a/neofetch +++ b/neofetch @@ -102,8 +102,10 @@ get_distro() { elif type -p tazpkg >/dev/null; then distro="SliTaz $(< /etc/slitaz-release)" + elif type -p kpm > /dev/null; then distro="KSLinux" + elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then distro="Android $(getprop ro.build.version.release)" @@ -435,6 +437,7 @@ get_packages() { type -p dpkg >/dev/null && \ packages="$((packages+=$(dpkg --get-selections | grep -cv deinstall$)))" + type -p kpm >/dev/null && \ packages="$((packages+=$(kpm --get-selections | grep -cv deinstall$)))" @@ -3077,7 +3080,7 @@ get_distro_colors() { "KSLinux"*) set_colors 4 7 1 - ascii_file="ks" + ascii_file="kslinux" ;; "Kubuntu"*) @@ -3385,7 +3388,7 @@ get_distro_colors() { ascii_file="void" ;; - *"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"*) + *"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"* | "windows10" | "windows8" ) set_colors 6 7 ascii_file="windows10" ;; From 4781f48e27b745b440af76e113d0f61ad0a46384 Mon Sep 17 00:00:00 2001 From: Takeya Yuki Date: Thu, 18 May 2017 14:56:35 +0800 Subject: [PATCH 25/50] Fix Bugs --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 10296eb9..4e92f6f9 100755 --- a/neofetch +++ b/neofetch @@ -1639,7 +1639,7 @@ get_term() { # Check $PPID for terminal emulator. while [[ -z "$term" ]]; do parent="$(get_ppid "$parent")" -       if [ "$parent" -lt 2 ]; then + if [ "$parent" -lt 2 ]; then parent=1 term="kernel shell on $(tty)" fi From 8f7b330bf721cb4fbeff1f32f5fecda19296dcba Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 18 May 2017 21:38:07 +0700 Subject: [PATCH 26/50] Distro [GuixSD]: Add version and shorthand option --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index da64c02e..9b852186 100755 --- a/neofetch +++ b/neofetch @@ -91,7 +91,10 @@ get_distro() { distro="$(lsb_release $lsb_flags)" elif type -p guix >/dev/null; then - distro="GuixSD" + case "$distro_shorthand" in + "on" | "tiny") distro="GuixSD" ;; + *) distro="GuixSD $(guix system -V | awk 'NR==1{printf $5}')" + esac elif type -p crux >/dev/null; then distro="$(crux)" From 4b0cf233a86e150766cf6f45d18045a3e71a29d7 Mon Sep 17 00:00:00 2001 From: Takeya Yuki Date: Sat, 20 May 2017 14:56:27 +0900 Subject: [PATCH 27/50] Remove PID Check --- neofetch | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/neofetch b/neofetch index ce553deb..0fada33c 100755 --- a/neofetch +++ b/neofetch @@ -1640,12 +1640,7 @@ get_term() { esac # Check $PPID for terminal emulator. - while [[ -z "$term" ]]; do - parent="$(get_ppid "$parent")" - if [ "$parent" -lt 2 ]; then - parent=1 - term="kernel shell on $(tty)" - fi + while [[ -z "$term" ]] || ((parent > 1)); do name="$(get_process_name "$parent")" From 82687cd6bf44e37ecfe294b900a8d1d37cc47298 Mon Sep 17 00:00:00 2001 From: Takeya Yuki Date: Sat, 20 May 2017 21:10:49 +0900 Subject: [PATCH 28/50] Fix Get Terminal Dead Loop --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 0fada33c..24ad3386 100755 --- a/neofetch +++ b/neofetch @@ -1651,6 +1651,7 @@ get_term() { "gnome-terminal-") term="gnome-terminal" ;; *) term="${name##*/}" ;; esac + break; done # Log that the function was run. @@ -4323,4 +4324,4 @@ main() { return 0 } -main "$@" \ No newline at end of file +main "$@" From 1f510e2b3267d2106fa0cb40a8cd431397ca66e2 Mon Sep 17 00:00:00 2001 From: Takeya Yuki Date: Sat, 20 May 2017 21:36:51 +0900 Subject: [PATCH 29/50] Fix Terminal Check --- neofetch | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index 24ad3386..4f29f239 100755 --- a/neofetch +++ b/neofetch @@ -1640,10 +1640,9 @@ get_term() { esac # Check $PPID for terminal emulator. - while [[ -z "$term" ]] || ((parent > 1)); do - + while [[ -z "$term" ]]; do + parent="$(get_ppid "$parent")" name="$(get_process_name "$parent")" - case "${name// }" in "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; @@ -1651,7 +1650,6 @@ get_term() { "gnome-terminal-") term="gnome-terminal" ;; *) term="${name##*/}" ;; esac - break; done # Log that the function was run. From 60f5009cf8d322e606b0f71ab3a950e4d6aa167e Mon Sep 17 00:00:00 2001 From: Takeya Yuki Date: Sat, 20 May 2017 21:58:18 +0900 Subject: [PATCH 30/50] Fix Terminal Check --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 4f29f239..9042bcba 100755 --- a/neofetch +++ b/neofetch @@ -1640,14 +1640,14 @@ get_term() { esac # Check $PPID for terminal emulator. - while [[ -z "$term" ]]; do + while [[ -z "$term" ]] || ((parent>1)); do parent="$(get_ppid "$parent")" name="$(get_process_name "$parent")" case "${name// }" in "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; - "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; + "login"* | *"Login"* | "init" | "(init)") term="$(tty)";break ;; "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;; - "gnome-terminal-") term="gnome-terminal" ;; + "gnome-terminal-") term="gnome-terminal";break ;; *) term="${name##*/}" ;; esac done From df6dab1721e43ca8e2056c2e0ba8f665c2207591 Mon Sep 17 00:00:00 2001 From: Takeya Yuki Date: Sat, 20 May 2017 22:17:56 +0900 Subject: [PATCH 31/50] Rollback without PID Check --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 9042bcba..4f29f239 100755 --- a/neofetch +++ b/neofetch @@ -1640,14 +1640,14 @@ get_term() { esac # Check $PPID for terminal emulator. - while [[ -z "$term" ]] || ((parent>1)); do + while [[ -z "$term" ]]; do parent="$(get_ppid "$parent")" name="$(get_process_name "$parent")" case "${name// }" in "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; - "login"* | *"Login"* | "init" | "(init)") term="$(tty)";break ;; + "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;; - "gnome-terminal-") term="gnome-terminal";break ;; + "gnome-terminal-") term="gnome-terminal" ;; *) term="${name##*/}" ;; esac done From ece5ccf44b995843e4cd747352f09f4ae23b4a7c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 24 May 2017 09:56:49 +1000 Subject: [PATCH 32/50] Config: Fixed bug with default config not getting created --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index da64c02e..c0526283 100755 --- a/neofetch +++ b/neofetch @@ -3563,7 +3563,7 @@ get_user_config() { config_file="${XDG_CONFIG_HOME}/neofetch/config" elif [[ -f "/etc/neofetch/config" ]]; then - cp "/usr/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch" + cp "/etc/neofetch/config" "${XDG_CONFIG_HOME}/neofetch" config_file="${XDG_CONFIG_HOME}/neofetch/config" elif [[ -f "/usr/local/etc/neofetch/config" ]]; then From 8e7fe64d82d4bc2e5536ca63fa01007741386932 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Wed, 24 May 2017 13:03:27 +1000 Subject: [PATCH 33/50] DOCS: Changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b80a93a..b8760ad9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,18 +6,21 @@ - **[@mstraube](https://github.com/mstraube)** - **[@Artoriuz](https://github.com/Artoriuz)** - **[@WilsonRU](https://github.com/WilsonRU)** +- **[@Takeya-Yuki](https://github.com/Takeya-Yuki)** ## Operating System - Added support for Arch XFerience. **[@mstraube](https://github.com/mstraube)** - 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. ## Images From d1fa88b7423cf8b9e4bc7445b9b6e37738b83869 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Wed, 24 May 2017 13:07:01 +1000 Subject: [PATCH 34/50] Config: Fix config not being created --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 4f29f239..fb9d320e 100755 --- a/neofetch +++ b/neofetch @@ -2300,10 +2300,10 @@ get_w3m_img_path() { elif [[ -x "/usr/libexec64/w3m/w3mimgdisplay" ]]; then w3m_img_path="/usr/libexec64/w3m/w3mimgdisplay" - + elif [[ -x "/usr/local/libexec/w3m/w3mimgdisplay" ]]; then w3m_img_path="/usr/local/libexec/w3m/w3mimgdisplay" - + else err "Image: w3m-img wasn't found on your system" fi @@ -3576,7 +3576,7 @@ get_user_config() { config_file="${XDG_CONFIG_HOME}/neofetch/config" elif [[ -f "/etc/neofetch/config" ]]; then - cp "/usr/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch" + cp "/etc/neofetch/config" "${XDG_CONFIG_HOME}/neofetch" config_file="${XDG_CONFIG_HOME}/neofetch/config" elif [[ -f "/usr/local/etc/neofetch/config" ]]; then From 767cd93f38fa368c1f02b01f919ac6672867b2ee Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Fri, 26 May 2017 09:21:22 +1000 Subject: [PATCH 35/50] change output for iPhone 5, fixes #730 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index fb9d320e..ea2c4e93 100755 --- a/neofetch +++ b/neofetch @@ -263,7 +263,7 @@ get_model() { "iPhone2,1") model="iPhone 3GS" ;; "iPhone3,"[1-3]) model="iPhone 4" ;; "iPhone4,1") model="iPhone 4S" ;; - "iPhone5,"[1-2]) model="iPhone 4" ;; + "iPhone5,"[1-2]) model="iPhone 5" ;; "iPhone5,"[3-4]) model="iPhone 5c" ;; "iPhone6,"[1-2]) model="iPhone 5s" ;; "iPhone7,2") model="iPhone 6" ;; From 329346d460ed15bbe6fbf751c26be203ca52fde9 Mon Sep 17 00:00:00 2001 From: LER0ever Date: Sat, 27 May 2017 13:30:02 +0800 Subject: [PATCH 36/50] Model: add support for Hackintosh --- neofetch | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index ea2c4e93..1a50b374 100755 --- a/neofetch +++ b/neofetch @@ -242,7 +242,13 @@ get_model() { fi ;; - "Mac OS X") model="$(sysctl -n hw.model)" ;; + "Mac OS X") + if [[ $(kextstat | grep "FakeSMC") != "" ]]; then + model="Hackintosh (SMBIOS: $(sysctl -n hw.model))" + else + model="$(sysctl -n hw.model)" + fi + ;; "iPhone OS") case "$machine_arch" in "iPad1,1") model="iPad" ;; From 0f945f9b637c33eb96fdf56029590df4466f9882 Mon Sep 17 00:00:00 2001 From: LER0ever Date: Sat, 27 May 2017 14:06:45 +0800 Subject: [PATCH 37/50] fix(style): double quote vars, remove unnecessary empty check --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 1a50b374..99f66bc4 100755 --- a/neofetch +++ b/neofetch @@ -243,7 +243,7 @@ get_model() { ;; "Mac OS X") - if [[ $(kextstat | grep "FakeSMC") != "" ]]; then + if [[ "$(kextstat | grep "FakeSMC")" ]]; then model="Hackintosh (SMBIOS: $(sysctl -n hw.model))" else model="$(sysctl -n hw.model)" From e68fc1167b3d55322e86bc709b0b0d8261c840d1 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Sat, 27 May 2017 16:17:41 +1000 Subject: [PATCH 38/50] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8760ad9..f09204b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - **[@Artoriuz](https://github.com/Artoriuz)** - **[@WilsonRU](https://github.com/WilsonRU)** - **[@Takeya-Yuki](https://github.com/Takeya-Yuki)** +- **[@LER0ever](https://github.com/LER0ever)** ## Operating System @@ -53,3 +54,7 @@ **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)** From 593ca37d261ab061cf33c29d7bdf55f2bf6dd354 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 28 May 2017 14:44:13 +1000 Subject: [PATCH 39/50] Revert "Model: Add support for Hackintosh" --- neofetch | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/neofetch b/neofetch index 99f66bc4..ea2c4e93 100755 --- a/neofetch +++ b/neofetch @@ -242,13 +242,7 @@ get_model() { fi ;; - "Mac OS X") - if [[ "$(kextstat | grep "FakeSMC")" ]]; then - model="Hackintosh (SMBIOS: $(sysctl -n hw.model))" - else - model="$(sysctl -n hw.model)" - fi - ;; + "Mac OS X") model="$(sysctl -n hw.model)" ;; "iPhone OS") case "$machine_arch" in "iPad1,1") model="iPad" ;; From 0ff2807c75681546e9de9245a840c406da3b9d4f Mon Sep 17 00:00:00 2001 From: LER0ever Date: Tue, 30 May 2017 17:05:33 +0800 Subject: [PATCH 40/50] Model: Add support for Hackintosh --- neofetch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index ea2c4e93..040226fa 100755 --- a/neofetch +++ b/neofetch @@ -242,7 +242,14 @@ get_model() { fi ;; - "Mac OS X") model="$(sysctl -n hw.model)" ;; + "Mac OS X") + if [[ "$(kextstat | grep "FakeSMC")" != "" ]]; then + model="Hackintosh (SMBIOS: $(sysctl -n hw.model))" + else + model="$(sysctl -n hw.model)" + fi + ;; + "iPhone OS") case "$machine_arch" in "iPad1,1") model="iPad" ;; From 6762381a82ebb51667e6883ad7fc03d5f720a7ef Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 2 Jun 2017 19:22:51 +0700 Subject: [PATCH 41/50] Terminal: Disable terminal detection if device is connected over SSH --- neofetch | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/neofetch b/neofetch index 040226fa..802e43f7 100755 --- a/neofetch +++ b/neofetch @@ -1648,15 +1648,19 @@ get_term() { # Check $PPID for terminal emulator. while [[ -z "$term" ]]; do - parent="$(get_ppid "$parent")" - name="$(get_process_name "$parent")" - case "${name// }" in - "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; - "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; - "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;; - "gnome-terminal-") term="gnome-terminal" ;; - *) term="${name##*/}" ;; - esac + if [[ "$SSH_CONNECTION" ]]; then + term="$SSH_TTY" + else + parent="$(get_ppid "$parent")" + name="$(get_process_name "$parent")" + case "${name// }" in + "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; + "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; + "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;; + "gnome-terminal-") term="gnome-terminal" ;; + *) term="${name##*/}" ;; + esac + fi done # Log that the function was run. From 4c22e1f19f547899b500f8cc885e6190e919d767 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 3 Jun 2017 13:36:59 +0700 Subject: [PATCH 42/50] Memory [FreeBSD]: Fix inaccurate free memory calculation --- neofetch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 040226fa..b39d0b34 100755 --- a/neofetch +++ b/neofetch @@ -1257,8 +1257,11 @@ get_memory() { case "$kernel_name" in "NetBSD"*) mem_free="$(($(awk -F ':|kB' '/MemFree:/ {printf $2}' /proc/meminfo) / 1024))" ;; "FreeBSD"* | "DragonFly"*) - mem_free="$(top -d 1 | awk -F ',' '/^Mem:/ {print $5}')" - mem_free="${mem_free/M Free}" + hw_pagesize="$(sysctl -n hw.pagesize)" + mem_inactive="$(($(sysctl -n vm.stats.vm.v_inactive_count) * hw_pagesize))" + mem_unused="$(($(sysctl -n vm.stats.vm.v_free_count) * hw_pagesize))" + mem_cache="$(($(sysctl -n vm.stats.vm.v_cache_count) * hw_pagesize))" + mem_free="$(((mem_inactive + mem_unused + mem_cache) / 1024 / 1024))" ;; "MINIX") mem_free="$(top -d 1 | awk -F ',' '/^Memory:/ {print $2}')" From b355096f4c726907d8849ccd4993885c10ffd58b Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 3 Jun 2017 13:55:34 +0700 Subject: [PATCH 43/50] docs: changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f09204b8..f58fe482 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ - 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. **GPU** From c7c84fcbba74770ccacae3c8e62308a9e4a8e3cb Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 4 Jun 2017 00:03:03 +0700 Subject: [PATCH 44/50] Term: Break from loop if PPID can't be accessed/not found --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 802e43f7..6019a6d5 100755 --- a/neofetch +++ b/neofetch @@ -1652,6 +1652,7 @@ get_term() { term="$SSH_TTY" else parent="$(get_ppid "$parent")" + [[ -z "$parent" ]] && break name="$(get_process_name "$parent")" case "${name// }" in "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; From f428478c4190db7c119fc15599d6e889a2fe5766 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 4 Jun 2017 11:08:23 +1000 Subject: [PATCH 45/50] DOCS: Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f58fe482..f02c2a9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ - 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** From 20d53bfee8ec858b0d55b42f7019d6b625efa72a Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 4 Jun 2017 11:09:05 +1000 Subject: [PATCH 46/50] DOCS: Changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f02c2a9b..c437a3bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,3 +60,8 @@ **Model** - Specify when running on a Hackintosh. **[@LER0ever](https://github.com/LER0ever)** + + +**Memory** + +- [FreeBSD]: Fix inaccurate free memory calculation. From 04bdb70227d9df1ee19aa8d129ea3d636b9969fe Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 9 Jun 2017 23:36:25 +0700 Subject: [PATCH 47/50] CPU [Solaris]: Truncate garbage output in SPARC systems --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 33f46c90..d9427bb5 100755 --- a/neofetch +++ b/neofetch @@ -949,6 +949,7 @@ get_cpu() { cpu="${cpu//*$'\n'}" cpu="${cpu/[0-9]\.*}" cpu="${cpu/ @*}" + cpu="${cpu/\(portid*}" # Get CPU speed. speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')" From c0fb89ce406f6bc3ba5ec997bfe94b0091b0df77 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 10 Jun 2017 00:54:50 +0700 Subject: [PATCH 48/50] Distro: Refactor $machine_arch --- neofetch | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index d9427bb5..95b59cbe 100755 --- a/neofetch +++ b/neofetch @@ -216,8 +216,14 @@ get_distro() { [[ -z "$distro" ]] && distro="$os (Unknown)" # Get OS architecture. - [[ "$os_arch" == "on" ]] && \ + if [[ "$os_arch" == "on" ]]; then + case "$os" in + "Solaris" | "AIX" | "BSD" | "macOS") machine_arch="$(uname -p)" ;; + *) machine_arch="$(uname -m)" ;; + + esac distro+=" ${machine_arch}" + fi [[ "${ascii_distro:-auto}" == "auto" ]] && \ ascii_distro="$(trim "$distro")" @@ -3772,11 +3778,10 @@ old_options() { cache_uname() { # Cache the output of uname so we don't # have to spawn it multiple times. - uname=($(uname -srm)) + uname=($(uname -sr)) kernel_name="${uname[0]}" kernel_version="${uname[1]}" - machine_arch="${uname[2]}" } convert_time() { From 2d1d689dd087d1193ebbb2acd05de39d19e67a25 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 10 Jun 2017 12:44:30 +0700 Subject: [PATCH 49/50] Distro [uname]: Remove macOS, add Haiku to use -p --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 95b59cbe..17965dfd 100755 --- a/neofetch +++ b/neofetch @@ -218,7 +218,7 @@ get_distro() { # Get OS architecture. if [[ "$os_arch" == "on" ]]; then case "$os" in - "Solaris" | "AIX" | "BSD" | "macOS") machine_arch="$(uname -p)" ;; + "Solaris" | "AIX" | "BSD" | "Haiku") machine_arch="$(uname -p)" ;; *) machine_arch="$(uname -m)" ;; esac From 89fec98db809110f4312eda676722cbde39b106f Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 10 Jun 2017 12:47:00 +0700 Subject: [PATCH 50/50] docs: changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c437a3bc..a2de9e40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,10 @@ ## Info +**Distro** + +- [Solaris, AIX, Haiku] The machine architecture will now be shown properly instead of machine ID. + **Terminal Emulator** - Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)**