From 4ebb0ac1537449c2e678cf815217db81f4e2ec8b Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Wed, 18 Jan 2017 17:40:27 +0100 Subject: [PATCH 001/308] Term Font: Add support for deepin-terminal --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index 7761f0df..f0458dd1 100755 --- a/neofetch +++ b/neofetch @@ -1617,6 +1617,10 @@ get_term_font() { term_font="$(osascript -e 'tell application "Terminal" to font name of window frontmost')" ;; + "deepin-terminal"*) + term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")" + ;; + "Hyper"*) term_font="$(awk -F "," '/fontFamily/ {a=$1} END{print a}' "${HOME}/.hyper.js" | awk -F "'" '{a=$2} END{print a}')" ;; From 8063e3722a3790060189ca80bdc142f48d0fdaa6 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 19 Jan 2017 08:59:23 +1100 Subject: [PATCH 002/308] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3675e2d..4426f5dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -167,6 +167,7 @@ Neofetch now has an irc channel at `#neofetch` on Freenode. If you have any ques - Added support for Konsole. **[@mstraube](https://github.com/mstraube)** - Added support for Sakura Terminal. **[@mstraube](https://github.com/mstraube)** - Added support for Pantheon Terminal. **[@mstraube](https://github.com/mstraube)** +- Added support for deepin-terminal. **[@mstraube](https://github.com/mstraube)** - [Termite] Fixed incorrect font chosen. **[@mstraube](https://github.com/mstraube)** - [Termite] Also look at default config. **[@mstraube](https://github.com/mstraube)** From 19d829706c79227116c4686bf069891123968140 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 19 Jan 2017 23:35:25 +1100 Subject: [PATCH 003/308] Args: Fix issues with symlinks --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 7761f0df..13482ca5 100755 --- a/neofetch +++ b/neofetch @@ -3255,7 +3255,7 @@ get_full_path() { # For example "Pictures/Wallpapers" --> "/home/dylan/Pictures/Wallpapers" # If the file exists in the current directory, stop here. - [[ -f "${PWD}/${1%/*}" ]] && { printf "%s\n" "${PWD}/${1%/*}"; return; } + [[ -f "${PWD}/${1/*\/}" ]] && { printf "%s\n" "${PWD}/${1/*\/}"; return; } if ! cd "${1%/*}"; then err "Error: Directory '${1%/*}' doesn't exist or is inaccessible" From 96b5708e2ed574371bae273757b387018839aac8 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 22 Jan 2017 13:31:31 +0700 Subject: [PATCH 004/308] Misc: Don't align whitespaces It interferes with manpage formatting and causes --ascii source DESC as --ascii source DESC --- neofetch | 12 ++++++------ neofetch.1 | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/neofetch b/neofetch index 889c9f5f..4dda1e3f 100755 --- a/neofetch +++ b/neofetch @@ -3733,12 +3733,12 @@ IMAGE BACKEND: Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m' --source source Which image or ascii file to use. Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' - --ascii source Shortcut to use 'ascii' backend. - --caca source Shortcut to use 'caca' backend. - --catimg source Shortcut to use 'catimg' backend. - --iterm2 source Shortcut to use 'iterm2' backend. - --tycat source Shortcut to use 'tycat' backend. - --w3m source Shortcut to use 'w3m' backend. + --ascii source Shortcut to use 'ascii' backend. + --caca source Shortcut to use 'caca' backend. + --catimg source Shortcut to use 'catimg' backend. + --iterm2 source Shortcut to use 'iterm2' backend. + --tycat source Shortcut to use 'tycat' backend. + --w3m source Shortcut to use 'w3m' backend. --off Shortcut to use 'off' backend. NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' diff --git a/neofetch.1 b/neofetch.1 index f78b53ef..78e9b2e3 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -181,23 +181,23 @@ Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w Which image or ascii file to use. Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' .TP -\fB\-\-ascii\fR -source Shortcut to use 'ascii' backend. +\fB\-\-ascii\fR source +Shortcut to use 'ascii' backend. .TP -\fB\-\-caca\fR -source Shortcut to use 'caca' backend. +\fB\-\-caca\fR source +Shortcut to use 'caca' backend. .TP -\fB\-\-catimg\fR -source Shortcut to use 'catimg' backend. +\fB\-\-catimg\fR source +Shortcut to use 'catimg' backend. .TP -\fB\-\-iterm2\fR -source Shortcut to use 'iterm2' backend. +\fB\-\-iterm2\fR source +Shortcut to use 'iterm2' backend. .TP -\fB\-\-tycat\fR -source Shortcut to use 'tycat' backend. +\fB\-\-tycat\fR source +Shortcut to use 'tycat' backend. .TP -\fB\-\-w3m\fR -source Shortcut to use 'w3m' backend. +\fB\-\-w3m\fR source +Shortcut to use 'w3m' backend. .TP \fB\-\-off\fR Shortcut to use 'off' backend. From 59e043b4815c384e8ccdec18037e48625772555e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 10:02:30 +1100 Subject: [PATCH 005/308] Docs: Add missing docs --- neofetch | 1 + neofetch.1 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/neofetch b/neofetch index 4dda1e3f..2c7b3c66 100755 --- a/neofetch +++ b/neofetch @@ -3737,6 +3737,7 @@ IMAGE BACKEND: --caca source Shortcut to use 'caca' backend. --catimg source Shortcut to use 'catimg' backend. --iterm2 source Shortcut to use 'iterm2' backend. + --jp2a source Shortcut to use 'jp2a' backend. --tycat source Shortcut to use 'tycat' backend. --w3m source Shortcut to use 'w3m' backend. --off Shortcut to use 'off' backend. diff --git a/neofetch.1 b/neofetch.1 index 78e9b2e3..af3cf330 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -193,6 +193,9 @@ Shortcut to use 'catimg' backend. \fB\-\-iterm2\fR source Shortcut to use 'iterm2' backend. .TP +\fB\-\-jp2a\fR source +Shortcut to use 'jp2a' backend. +.TP \fB\-\-tycat\fR source Shortcut to use 'tycat' backend. .TP From 212bb65163200afcc049bf993fe3fd1f71fc20b8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 10:12:26 +1100 Subject: [PATCH 006/308] Image: Fix stray space --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 2c7b3c66..0b805d26 100755 --- a/neofetch +++ b/neofetch @@ -2359,7 +2359,7 @@ display_image() { ;; "catimg") - catimg -w "$((width * 2 / font_width))" -r 0 "$image" || to_off "Image: catimg failed to display the image." + catimg -w "$((width * 2 / font_width))" -r 0 "$image" || to_off "Image: catimg failed to display the image." zws= ;; From a3b2933d36d4e2c37e4d91bd83573db5285a9319 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 10:39:40 +1100 Subject: [PATCH 007/308] Update CHANGELOG.md --- CHANGELOG.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4426f5dc..14b720dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,3 @@ -From the 2.0 release but it applies here too: - -> Some of the config options/arguments were renamed/changed and Neofetch will warn you on run if you're using deprecated options (`neofetch -v`). For this release I recommend using this release with a fresh config file so that you can make use of the new documentation. - -> I say this every release; This changelog is incomplete, for a full list of changes take a look through the commit history. Neofetch now has an unspoken commit style so reading the commit history won't hurt as much as it used to. - Thanks to everyone who contributed this release, there were a lot of new faces this time around. :) @@ -16,6 +10,7 @@ Thanks to everyone who contributed this release, there were a lot of new faces t - **[@mstraube](https://github.com/mstraube)** - **[@gavinhungry](https://github.com/gavinhungry)** + ## IRC Neofetch now has an irc channel at `#neofetch` on Freenode. If you have any questions, issues or ideas feel free to join the irc channel and I'll be happy to assist you. I know that we've already got the gitter chat but hopefully this makes things easier for those without a github account. :) @@ -23,6 +18,11 @@ Neofetch now has an irc channel at `#neofetch` on Freenode. If you have any ques [![Freenode](https://img.shields.io/badge/%23neofetch-%20on%20Freenode-brightgreen.svg)](http://irc.lc/freenode/neofetch) +## Collaborators + +I have given collaborator acces to both **[@konimex](https://github.com/konimex)** and **[@iandrewt](https://github.com/iandrewt)**. In short this allows them to push directly to the master branch of the repo, manage the issue tracker and also merge pull requests. They've been a huge help the past year so this made sense to me. + + ## OS - Added support for AIX. From 51352033153f04f06380707c73a0fa4a67fb8f32 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 10:47:19 +1100 Subject: [PATCH 008/308] Update CHANGELOG.md --- CHANGELOG.md | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14b720dc..da6fde6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,26 +43,25 @@ I have given collaborator acces to both **[@konimex](https://github.com/konimex) ## General - The config file is now installed to `/etc/neofetch/config` and acts as a system-wide config file for neofetch. Editing this file will make the changes available to all users on the system. Those packaging Neofetch **without** using the Makefile will need to make changes to support this. +- Removed executable permission from config files. BASH can source them even if they're un-executable. - Travis now runs [shellcheck](https://github.com/koalaman/shellcheck) on every commit and pull request. - We've had to exclude around 10 lint errors, see this wiki page for why we did this: - https://github.com/dylanaraps/neofetch/wiki/Shellcheck-Exclusions - Neofetch now supports relative path values when specifying the location to images, ascii files and config files. - For example, `neofetch --w3m Pictures/Wallpapers/10.jpg` and `neofetch --w3m 10.jpg` now work. -- Optimize usage of get_de(), get_wm() and get_term(). - - We were calling these multiple times, we now check to see if they were run previously. -- Optimize info caching, only check for cache files in scripts that use caching. -- Cleanup `main()`. -- Renamed `old_flags()` --> `old_options()`. +- Optimize usage of `get_de()`, `get_wm()` and `get_term(). + - We were calling these multiple times, we now only run them once and check to see if they were run previously. +- Optimize info caching, only check for cache files in functions that use caching. - The manpage is now generated using `help2man`. `help2man` parses the output of `--help` and `--version` to create a manpage. This ensures that our manpage stays 1:1 with the script documentation. We actually found a lot of outdated info in the old manpage thanks to this. - A new flag was added called `--gen-man` which generates a neofetch manpage in your current directory. - Delete most of `info()` and instead call `prin()`. - This removes a lot of duplicate code between `info()` and `prin()`. - Remove `printf` subshells and instead use `printf -v` to declare the variables. -- Set fixed `$PATH` in the beginning of the script. - Fixed artifacts when using line-breaks in TTYs. -- Removed executable permission from config files. BASH can source them even if they're un-executable. - All errors are now sent to `stderr`. - Renamed `XFCE` --> `Xfce`. **[@gavinhungry](https://github.com/gavinhungry)** +- Cleanup `main()`. +- Renamed `old_flags()` --> `old_options()`. ## Info @@ -71,7 +70,7 @@ I have given collaborator acces to both **[@konimex](https://github.com/konimex) - [Fish] Fixed memory leak caused by Fish. - Added support for `xonsh`. - Fixed version output on `ksh`. -- Rewrote the function to remove duplicate code. All shells now use `$SHELL --version` to get the version info, with the exception of `mksh` which doesn't have a `--version` flag. +- Rewrote the function to remove duplicate code. **Uptime**
@@ -89,8 +88,6 @@ I have given collaborator acces to both **[@konimex](https://github.com/konimex) - [Linux] Don't simplify `cpufreq` speed option names for no reason. - [Linux] Fixed issues with CPU name detection for architectures other than x86/amd64/ARM. - [NetBSD] Remove case statement in favor of 1 line test. -- Remove case sensitive substitutions. - - We match everything case insensitively so they were pointless. - Simplify check for low CPU speeds. - Expanded `cpu_temp` to take the values `C` and `F`. This means you can now display the CPU temperature as Fahrenheit. @@ -115,7 +112,7 @@ I have given collaborator acces to both **[@konimex](https://github.com/konimex) **~~Birthday~~ Install Date**
- Renamed `get_birthday()` -- > `get_install_date()` -- Removed all `date` usage from `get_install_date()`. +- Removed all `date` command usage from `get_install_date()`. - Added a new function called `convert_time()` which takes the time stamped `ls` output and converts it to a pretty format. The function only uses bash so its much faster than calling `date`. This makes things simple and keeps the output consistent across all Operating Systems. Example: `2016-12-06 16:58:58.000000000` --> `Tue 06 Dec 2016 4:58 PM` - Added an option so users can choose between using 24-hour and 12-hour time format - `get_install_date()` will detect which `ls` program is being used instead of hardcoding them per OS. @@ -146,11 +143,6 @@ I have given collaborator acces to both **[@konimex](https://github.com/konimex) **Song**
-- [cmus] Simplify block and fix `artistsort` bug. -- Removed `state` detection. -- Removed duplicate `dbus-send` commands. **[@mstraube](https://github.com/mstraube)** -- Hide output if no song is playing. -- Enforce order `artist - title` in `get_song_dbus()`. **[@mstraube](https://github.com/mstraube)** - Added support for xmms2. **[@z33ky](https://github.com/z33ky)** - Added support for Exaile music player. **[@mstraube](https://github.com/mstraube)** - Added support for JuK .**[@mstraube](https://github.com/mstraube)** @@ -160,6 +152,11 @@ I have given collaborator acces to both **[@konimex](https://github.com/konimex) - Added support for Qmmp. **[@mstraube](https://github.com/mstraube)** - Added support for QuodLibet. **[@mstraube](https://github.com/mstraube)** - Added support for Mopidy. **[@d3rrial](https://github.com/d3rrial)** +- [cmus] Simplify block and fix `artistsort` bug. +- Removed `state` detection. +- Removed duplicate `dbus-send` commands. **[@mstraube](https://github.com/mstraube)** +- Hide output if no song is playing. +- Enforce order `artist - title` in `get_song_dbus()`. **[@mstraube](https://github.com/mstraube)** **Terminal Font**
@@ -182,7 +179,7 @@ I have given collaborator acces to both **[@konimex](https://github.com/konimex) **Color Blocks**
-- Use start++ instead of adding it manually after case. **[@konimex](https://github.com/konimex)** +- Use `start++` instead of adding it manually after case. **[@konimex](https://github.com/konimex)** - Fixed bug where color blocks wouldn't respect width in TTYs. - Cursor positioning now takes `$block_height` into account. - Fixed all artifacts in virtual consoles. From acb4f148229f0e838f412b6e6121b7a5811a6e16 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 10:54:17 +1100 Subject: [PATCH 009/308] General: Remove stray newline --- neofetch | 1 - 1 file changed, 1 deletion(-) diff --git a/neofetch b/neofetch index 0b805d26..d9e4fb8c 100755 --- a/neofetch +++ b/neofetch @@ -898,7 +898,6 @@ get_cpu() { else temp="[${temp}°C]" fi - fi ;; From 0abf02a401053ea5413141ef06511be6a7d8c0bf Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 11:00:27 +1100 Subject: [PATCH 010/308] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da6fde6d..d7ed71c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,7 +42,8 @@ I have given collaborator acces to both **[@konimex](https://github.com/konimex) ## General -- The config file is now installed to `/etc/neofetch/config` and acts as a system-wide config file for neofetch. Editing this file will make the changes available to all users on the system. Those packaging Neofetch **without** using the Makefile will need to make changes to support this. +- The default config file is now installed to `/etc/neofetch/config` and acts as a system-wide config file for neofetch. Editing this file will make the changes available to all users on the system. Those packaging Neofetch **without** using the Makefile will need to make changes to support this. +- The Makefile was rewritten to remove GNU-isms. - Removed executable permission from config files. BASH can source them even if they're un-executable. - Travis now runs [shellcheck](https://github.com/koalaman/shellcheck) on every commit and pull request. - We've had to exclude around 10 lint errors, see this wiki page for why we did this: From cce406032be97ea2f79259f9883c4c303e252733 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 11:00:38 +1100 Subject: [PATCH 011/308] General: Bump version number to 3.0 --- neofetch | 8 ++++---- neofetch.1 | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index d9e4fb8c..0d934b6b 100755 --- a/neofetch +++ b/neofetch @@ -3482,16 +3482,16 @@ old_options() { [[ -n "$progress_color_elapsed" ]] && err "Config: \$progress_color_elapsed is deprecated, use \$bar_color_elapsed instead." [[ -n "$progress_color_total" ]] && err "Config: \$progress_color_total is deprecated, use \$bar_color_total instead." - # All cpufreq values were changed in 2.1.0. + # All cpufreq values were changed in 3.0. [[ "$speed_type" == "current" ]] && err "Config: speed_type='current' is deprecated, use speed_type='scaling_cur_freq' instead." [[ "$speed_type" == "min" ]] && err "Config: speed_type='min' is deprecated, use speed_type='scaling_min_freq' instead." [[ "$speed_type" == "max" ]] && err "Config: speed_type='max' is deprecated, use speed_type='scaling_max_freq' instead." [[ "$speed_type" == "bios" ]] && err "Config: speed_type='bios' is deprecated, use speed_type='bios_limit' instead." - # Ascii_logo_size was removed in 2.1.0. + # Ascii_logo_size was removed in 3.0. [[ "$ascii_logo_size" ]] && err "Config: ascii_logo_size is deprecated, use ascii_distro='{alpine,arch,crux,gentoo,openbsd,void}_small' instead." - # $start and $end were replaced with ${block_range[@]} in 2.1.0. + # $start and $end were replaced with ${block_range[@]} in 3.0. [[ "$start" && "$end" ]] && { err "Config: \$start and \$end are deprecated, use block_range=(0 7) instead."; block_range=("$start" "$end"); } # Fahrenheit support was added to CPU so the options were changed. @@ -3811,7 +3811,7 @@ exit 1 } version() { printf "%s" "\ -Neofetch 2.1.0 +Neofetch 3.0 Copyright (c) 2016-2017 Dylan Araps diff --git a/neofetch.1 b/neofetch.1 index af3cf330..77896cf2 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" "January 2017" "Neofetch 2.1.0" "User Commands" +.TH NEOFETCH "1" "January 2017" "Neofetch 3.0" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS From 5c4d0a5453254470a7b4488a91e6e533d1c609cc Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 14:40:31 +1100 Subject: [PATCH 012/308] Update CHANGELOG.md --- CHANGELOG.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7ed71c1..7e40cc36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +This is another large release containing over `550` commits from 7 contributors. Due to the size and large amount of changes made this release expect at least one minor release to fix any bugs that come up. + +The version number has been bumped to `3.0` due to the large amount of breaking changes introduced this update. I've added backwards compatibility for all of the new changes but there may still be some breakage. I highly recommend starting with a new config to avoid any issues that may arise. + +Neofetch now supports displaying images using `catimg`, `libcaca` and `jp2a`. See this wiki page for screenshots. https://github.com/dylanaraps/neofetch/wiki/Image-Backends + Thanks to everyone who contributed this release, there were a lot of new faces this time around. :) @@ -13,14 +19,14 @@ Thanks to everyone who contributed this release, there were a lot of new faces t ## IRC -Neofetch now has an irc channel at `#neofetch` on Freenode. If you have any questions, issues or ideas feel free to join the irc channel and I'll be happy to assist you. I know that we've already got the gitter chat but hopefully this makes things easier for those without a github account. :) +Neofetch now has an IRC channel at `#neofetch` on Freenode. If you have any questions, issues or ideas feel free to join the IRC channel and I'll be happy to assist you. I know that we've already got the Gitter chat but hopefully this makes things easier for those without a GitHub account. :) [![Freenode](https://img.shields.io/badge/%23neofetch-%20on%20Freenode-brightgreen.svg)](http://irc.lc/freenode/neofetch) ## Collaborators -I have given collaborator acces to both **[@konimex](https://github.com/konimex)** and **[@iandrewt](https://github.com/iandrewt)**. In short this allows them to push directly to the master branch of the repo, manage the issue tracker and also merge pull requests. They've been a huge help the past year so this made sense to me. +I have given collaborator access to both **[@konimex](https://github.com/konimex)** and **[@iandrewt](https://github.com/iandrewt)**. In short this allows them to push directly to the master branch of the repo, manage the issue tracker and also merge pull requests. They've been a huge help the past year so this made sense to me. ## OS @@ -42,7 +48,7 @@ I have given collaborator acces to both **[@konimex](https://github.com/konimex) ## General -- The default config file is now installed to `/etc/neofetch/config` and acts as a system-wide config file for neofetch. Editing this file will make the changes available to all users on the system. Those packaging Neofetch **without** using the Makefile will need to make changes to support this. +- The default config file is now installed to `/etc/neofetch/config` and acts as a system-wide config file for Neofetch. Editing this file will make the changes available to all users on the system. Those packaging Neofetch **without** using the Makefile will need to make changes to support this. - The Makefile was rewritten to remove GNU-isms. - Removed executable permission from config files. BASH can source them even if they're un-executable. - Travis now runs [shellcheck](https://github.com/koalaman/shellcheck) on every commit and pull request. @@ -64,6 +70,7 @@ I have given collaborator acces to both **[@konimex](https://github.com/konimex) - Cleanup `main()`. - Renamed `old_flags()` --> `old_options()`. + ## Info **Shell**
From a02eb6f91da6a54b68f147b17f3359340e00c27f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 14:40:29 +1100 Subject: [PATCH 013/308] Changelog: Empty changelog --- CHANGELOG.md | 252 --------------------------------------------------- 1 file changed, 252 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e40cc36..e69de29b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,252 +0,0 @@ -This is another large release containing over `550` commits from 7 contributors. Due to the size and large amount of changes made this release expect at least one minor release to fix any bugs that come up. - -The version number has been bumped to `3.0` due to the large amount of breaking changes introduced this update. I've added backwards compatibility for all of the new changes but there may still be some breakage. I highly recommend starting with a new config to avoid any issues that may arise. - -Neofetch now supports displaying images using `catimg`, `libcaca` and `jp2a`. See this wiki page for screenshots. https://github.com/dylanaraps/neofetch/wiki/Image-Backends - -Thanks to everyone who contributed this release, there were a lot of new faces this time around. :) - - -## Contributors - -- **[@konimex](https://github.com/konimex)** -- **[@iandrewt](https://github.com/iandrewt)** -- **[@jorgegonzalez](https://github.com/jorgegonzalez)** -- **[@z33ky](https://github.com/z33ky)** -- **[@mstraube](https://github.com/mstraube)** -- **[@gavinhungry](https://github.com/gavinhungry)** - - -## IRC - -Neofetch now has an IRC channel at `#neofetch` on Freenode. If you have any questions, issues or ideas feel free to join the IRC channel and I'll be happy to assist you. I know that we've already got the Gitter chat but hopefully this makes things easier for those without a GitHub account. :) - -[![Freenode](https://img.shields.io/badge/%23neofetch-%20on%20Freenode-brightgreen.svg)](http://irc.lc/freenode/neofetch) - - -## Collaborators - -I have given collaborator access to both **[@konimex](https://github.com/konimex)** and **[@iandrewt](https://github.com/iandrewt)**. In short this allows them to push directly to the master branch of the repo, manage the issue tracker and also merge pull requests. They've been a huge help the past year so this made sense to me. - - -## OS - -- Added support for AIX. -- Added support for AntiX. -- Added support for GNU/kFreeBSD. -- Added support for Gentoo FreeBSD. -- Added support for GrombyangOS. -- Added support for Joyent SmartOS. -- Added support for Mer. -- Added support for MINIX. -- Added support for MX. -- Added support for Open Source Media Center (OSMC). -- Added support for SalentOS. -- Added support for TrueOS. -- Added support for Windows (MSYS2). - - -## General - -- The default config file is now installed to `/etc/neofetch/config` and acts as a system-wide config file for Neofetch. Editing this file will make the changes available to all users on the system. Those packaging Neofetch **without** using the Makefile will need to make changes to support this. -- The Makefile was rewritten to remove GNU-isms. -- Removed executable permission from config files. BASH can source them even if they're un-executable. -- Travis now runs [shellcheck](https://github.com/koalaman/shellcheck) on every commit and pull request. - - We've had to exclude around 10 lint errors, see this wiki page for why we did this: - - https://github.com/dylanaraps/neofetch/wiki/Shellcheck-Exclusions -- Neofetch now supports relative path values when specifying the location to images, ascii files and config files. - - For example, `neofetch --w3m Pictures/Wallpapers/10.jpg` and `neofetch --w3m 10.jpg` now work. -- Optimize usage of `get_de()`, `get_wm()` and `get_term(). - - We were calling these multiple times, we now only run them once and check to see if they were run previously. -- Optimize info caching, only check for cache files in functions that use caching. -- The manpage is now generated using `help2man`. `help2man` parses the output of `--help` and `--version` to create a manpage. This ensures that our manpage stays 1:1 with the script documentation. We actually found a lot of outdated info in the old manpage thanks to this. - - A new flag was added called `--gen-man` which generates a neofetch manpage in your current directory. -- Delete most of `info()` and instead call `prin()`. - - This removes a lot of duplicate code between `info()` and `prin()`. -- Remove `printf` subshells and instead use `printf -v` to declare the variables. -- Fixed artifacts when using line-breaks in TTYs. -- All errors are now sent to `stderr`. -- Renamed `XFCE` --> `Xfce`. **[@gavinhungry](https://github.com/gavinhungry)** -- Cleanup `main()`. -- Renamed `old_flags()` --> `old_options()`. - - -## Info - -**Shell**
- -- [Fish] Fixed memory leak caused by Fish. -- Added support for `xonsh`. -- Fixed version output on `ksh`. -- Rewrote the function to remove duplicate code. - -**Uptime**
- -- Moved duplicate code to a function. -- Changed `$uptime_shorthand` to `on` by default. - -**Desktop Environment**
- -- Fixed issues where MATE wouldn't be detected properly. -- Added fallback to `$DESKTOP_SESSION`, `$MATE_DESKTOP_SESSION_ID` and `$GNOME_DESKTOP_SESSION_ID`. -- Hide Desktop Environment if it matches Window Manager. - -**CPU**
- -- [Linux] Don't simplify `cpufreq` speed option names for no reason. -- [Linux] Fixed issues with CPU name detection for architectures other than x86/amd64/ARM. -- [NetBSD] Remove case statement in favor of 1 line test. -- Simplify check for low CPU speeds. -- Expanded `cpu_temp` to take the values `C` and `F`. This means you can now display the CPU temperature as Fahrenheit. - -**CPU Usage**
- -- Added Haiku cores command. -- Updated Linux and macOS commands to the match the commands in the `get_cpu()` function. - -**GPU**
- -- [Linux] Each GPU is now printed on a separate line. -- [Linux] Added `--gpu_type` / `$gpu_type` which lets you display `all`, `dedicated` or `integrated` GPUs. - -**Memory**
- -- [Solaris] Fixed inaccurate used memory size. - -**Resolution**
- -- [Windows] Declare variables locally to fix conflicts in other functions. - -**~~Birthday~~ Install Date**
- -- Renamed `get_birthday()` -- > `get_install_date()` -- Removed all `date` command usage from `get_install_date()`. -- Added a new function called `convert_time()` which takes the time stamped `ls` output and converts it to a pretty format. The function only uses bash so its much faster than calling `date`. This makes things simple and keeps the output consistent across all Operating Systems. Example: `2016-12-06 16:58:58.000000000` --> `Tue 06 Dec 2016 4:58 PM` -- Added an option so users can choose between using 24-hour and 12-hour time format -- `get_install_date()` will detect which `ls` program is being used instead of hardcoding them per OS. - -**Disk**
- -- Rewrote function from scratch. - - The function is `40` lines smaller than before and works on all \[1\] versions of `df` we tested on \[2\]. -- Added the option/flag `disk_show` which allows you to specify which disks, mount points or directories to show the disk info of. (One per line) -- Added the option/flag `disk_subtitle` which allows you to specify how we label each disk. (Mount point or Disk name) -- Removed all percentage calculation since `df` already provides us with the percentage. -- Warn the user if `df` isn't installed. -- Fixed broken output if `df` wasn't installed but the function was enabled. - -\[1\] The function doesn't work on Haiku since their `df` is wildly non-standard. (The output format and flags are 100% different from all of the other `df` versions floating around.) - -\[2\] Tested on `GNU`, `Busybox`, `BSD`, `Solaris` and `macOS` `df` versions. - -**Theme**
- -- [KDE] Don't display GTK Themes if KDE is detected. -- [KDE] If `kde[0-9]-config` isn't found, try and look for `$HOME/.kde`. - -**Window Manager Theme**
- -- Fixed WM Theme not detected on MATE. **[@mstraube](https://github.com/mstraube)** -- Fixed WM Theme detection on KDE. **[@mstraube](https://github.com/mstraube)** - -**Song**
- -- Added support for xmms2. **[@z33ky](https://github.com/z33ky)** -- Added support for Exaile music player. **[@mstraube](https://github.com/mstraube)** -- Added support for JuK .**[@mstraube](https://github.com/mstraube)** -- Added support for Bluemindo. **[@mstraube](https://github.com/mstraube)** -- Added support for Guayadeque Player. **[@mstraube](https://github.com/mstraube)** -- Added support for Yarock. **[@mstraube](https://github.com/mstraube)** -- Added support for Qmmp. **[@mstraube](https://github.com/mstraube)** -- Added support for QuodLibet. **[@mstraube](https://github.com/mstraube)** -- Added support for Mopidy. **[@d3rrial](https://github.com/d3rrial)** -- [cmus] Simplify block and fix `artistsort` bug. -- Removed `state` detection. -- Removed duplicate `dbus-send` commands. **[@mstraube](https://github.com/mstraube)** -- Hide output if no song is playing. -- Enforce order `artist - title` in `get_song_dbus()`. **[@mstraube](https://github.com/mstraube)** - -**Terminal Font**
- -- Added support for Alacritty. -- Added support for Konsole. **[@mstraube](https://github.com/mstraube)** -- Added support for Sakura Terminal. **[@mstraube](https://github.com/mstraube)** -- Added support for Pantheon Terminal. **[@mstraube](https://github.com/mstraube)** -- Added support for deepin-terminal. **[@mstraube](https://github.com/mstraube)** -- [Termite] Fixed incorrect font chosen. **[@mstraube](https://github.com/mstraube)** -- [Termite] Also look at default config. **[@mstraube](https://github.com/mstraube)** - -**Battery**
- -- [MacOS] Fixed issue where battery always appears as charging. **[@jorgegonzalez](https://github.com/jorgegonzalez)** - -**Local IP**
- -- [BSD and Solaris] Merged the detection to Linux. -- [Windows] Support multiple interfaces. - -**Color Blocks**
- -- Use `start++` instead of adding it manually after case. **[@konimex](https://github.com/konimex)** -- Fixed bug where color blocks wouldn't respect width in TTYs. -- Cursor positioning now takes `$block_height` into account. -- Fixed all artifacts in virtual consoles. -- Merged `$start` and `$end` into an array called `block_range`. - - This makes the config option match the command-line flag `--block_range`. - - -## Images - -- [iTerm2] Fixed blank images. -- Fixed bug where image mode would attempt to run in a TTY. -- All of the image/ascii backend handling was rewritten. Backend and Image/File/Directory selection is universal now and should make usage easier. - - Added `catimg` backend. - - Added `caca` backend. - - Added `jp2a` backend. - - `--image` has been replaced with `--backend`. - - `--backend` takes `ascii`, `caca`, `catimg`, `jp2a`, `iterm2`, `off`, `tycat`, `w3m`. - - Shortcut flags were added for easy picking of backends. - - Each flag can take a file, image or directory as an argument. - - For example: `neofetch --w3m /path/to/img.jpg` `neofetch --ascii /path/to/file` - - `--w3m` - - `--iterm2` - - `--tycat` - - `--ascii` - - `--off` - - `--catimg` - - `--caca` - - `--jp2a` - - All image and ascii file selection has been replaced with the universal `--source`. - - The value of `--source` can be any of the following: - - `auto`, `ascii`, `wallpaper`, `/path/to/img`, `/path/to/ascii`, `/path/to/dir/`. -- Fixed bugs with image shuffle mode. - - -## Wallpaper - -- Decode URI filenames. - - -## Ascii - -- Simplified ascii file handling. - - Removed a call to `tr` for those using `bash 3`. - - Fixed distro detection issues. - - Removed the assumption that `first word in distro --> ascii file name` -- Added Ubuntu-Studio. **[@konimex](https://github.com/konimex)** -- Fixed bug causing macOS ascii art to be used on other Operating Systems. -- Display warning about 'ascii' being the new default mode. -- Removed `ascii_logo_size` in favor of `ascii_distro='{arch,crux,gentoo}_small'`. -- [PCBSD] Use TrueOS ascii art. -- Added Void Linux (small) and Alpine Linux (small). - - -## Screenshot - -- Use arrays for `$scrot_program` - - -## Args - -- Fixed bug where `neofetch --config` sourced the user config twice. -- Cleaned up config arg handling. From 611c88b29c6bafbf7d9050b13c20a5eb4d6492c4 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 14:41:10 +1100 Subject: [PATCH 014/308] General: Bump version to 0.1 --- neofetch | 2 +- neofetch.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 0d934b6b..6553c9d3 100755 --- a/neofetch +++ b/neofetch @@ -3811,7 +3811,7 @@ exit 1 } version() { printf "%s" "\ -Neofetch 3.0 +Neofetch 3.0.1 Copyright (c) 2016-2017 Dylan Araps diff --git a/neofetch.1 b/neofetch.1 index 77896cf2..ceec6390 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" "January 2017" "Neofetch 3.0" "User Commands" +.TH NEOFETCH "1" "January 2017" "Neofetch 3.0.1" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS From 08276bde5eae3ecf8eb396fa548e3726b170dedc Mon Sep 17 00:00:00 2001 From: SomaUlte Date: Mon, 23 Jan 2017 04:01:50 -0500 Subject: [PATCH 015/308] Update neofetch --- neofetch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 6553c9d3..06ee2a49 100755 --- a/neofetch +++ b/neofetch @@ -1075,7 +1075,11 @@ get_gpu() { ;; *"intel"*) - gpu="Intel Integrated Graphics" + if [[ $(glxinfo | grep 'OpenGL renderer string: Mesa' | sed 's/ renderer.*//') = "OpenGL" ]]; then + gpu="$(DRI_PRIME=1 glxinfo | grep 'OpenGL renderer' | sed '0,/^.*Intel/ s//Intel/' | sed 's/(R)//' | sed 's/\(\.* (\).*//')" + else + gpu="Intel Integrated Graphics" + fi ;; *"virtualbox"*) From 0dff1213906f73106b8bccd4b0c4bce08f303420 Mon Sep 17 00:00:00 2001 From: SomaUlte Date: Mon, 23 Jan 2017 04:34:13 -0500 Subject: [PATCH 016/308] apply dylanaraps' changes --- neofetch | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 06ee2a49..a39804be 100755 --- a/neofetch +++ b/neofetch @@ -1075,11 +1075,12 @@ get_gpu() { ;; *"intel"*) - if [[ $(glxinfo | grep 'OpenGL renderer string: Mesa' | sed 's/ renderer.*//') = "OpenGL" ]]; then - gpu="$(DRI_PRIME=1 glxinfo | grep 'OpenGL renderer' | sed '0,/^.*Intel/ s//Intel/' | sed 's/(R)//' | sed 's/\(\.* (\).*//')" - else - gpu="Intel Integrated Graphics" - fi + gpu="$(glxinfo | grep -F "Device:")" + gpu="${gpu/*Intel/Intel}" + gpu="${gpu/'(R)'}" + gpu="${gpu/ \(*}" + + [[ -z "$(trim "$gpu")" ]] && gpu="Intel Integrated Graphics" ;; *"virtualbox"*) From c8cce9acb50d19001d6cb451689d5531b44fc1f5 Mon Sep 17 00:00:00 2001 From: SomaUlte Date: Mon, 23 Jan 2017 04:37:03 -0500 Subject: [PATCH 017/308] check for "Intel" in glxinfo grep --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index a39804be..6f68d4ac 100755 --- a/neofetch +++ b/neofetch @@ -1075,7 +1075,7 @@ get_gpu() { ;; *"intel"*) - gpu="$(glxinfo | grep -F "Device:")" + gpu="$(glxinfo | grep "Device:.*Intel")" gpu="${gpu/*Intel/Intel}" gpu="${gpu/'(R)'}" gpu="${gpu/ \(*}" From ef6b55e3f67657aea51e4bb2675a9a63b8ebef2f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 20:43:54 +1100 Subject: [PATCH 018/308] Update CHANGELOG.md --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29b..1d22d4e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +## Contributors + +- **[@SomaUlte](https://github.com/SomaUlte)** + + +## Info + +**GPU**
+ +- [Linux] Display detailed information about Intel GPUs. **[@SomaUlte](https://github.com/SomaUlte)** From e4ffa945f955495cadfda258be3012d755b27a75 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 23 Jan 2017 23:59:21 +1100 Subject: [PATCH 019/308] Cols: Fixed color_blocks=off causing an extra newline to be printed --- neofetch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 6553c9d3..68217701 100755 --- a/neofetch +++ b/neofetch @@ -1940,9 +1940,11 @@ get_cols() { cols="${cols//nl/\\n\\033[${text_padding}C${zws}}" printf "%b\n" "\033[${text_padding}C${zws}${cols}" - info_height="$((info_height+=block_height+2))" + else + printf "\n" fi + info_height="$((info_height+=block_height+2))" unset -v blocks blocks2 cols # Tell info() that we printed manually. From c521c180bd191601650651039346d2e77248aa95 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 01:17:06 +1100 Subject: [PATCH 020/308] Docs: Changelog --- CHANGELOG.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d22d4e8..f11790c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,14 @@ -## Contributors - -- **[@SomaUlte](https://github.com/SomaUlte)** - - -## Info - -**GPU**
- -- [Linux] Display detailed information about Intel GPUs. **[@SomaUlte](https://github.com/SomaUlte)** +## Contributors + +- **[@SomaUlte](https://github.com/SomaUlte)** + + +## Info + +**GPU**
+ +- [Linux] Display detailed information about Intel GPUs. **[@SomaUlte](https://github.com/SomaUlte)** + +**Color Blocks**
+ +- Fixed issue with `color_blocks="off"` adding an extra newline to the output. From 40d764ca6a3ebd8f8b0e430765543ee0ddde4734 Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Mon, 23 Jan 2017 09:33:05 -0500 Subject: [PATCH 021/308] Image: Fixed issue where linebreaks caused stray spaces to print over images --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 1f764b9b..fab4cb3a 100755 --- a/neofetch +++ b/neofetch @@ -2376,6 +2376,7 @@ display_image() { "iterm2") printf "%b\a\n" "\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")" + zws= ;; "tycat") From 6bb7126a57024a2df306f90393710942a219f204 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 01:45:13 +1100 Subject: [PATCH 022/308] Docs: Changelog.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f11790c2..0e938daa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Contributors - **[@SomaUlte](https://github.com/SomaUlte)** +- **[@jorgegonzalez](https://github.com/jorgegonzalez)** ## Info @@ -12,3 +13,7 @@ **Color Blocks**
- Fixed issue with `color_blocks="off"` adding an extra newline to the output. + +## Images + +- [iTerm2] Fixed issue with linebreaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** From 38cb68b2dd638d59b90ffe8bb7be63c3bafeecfb Mon Sep 17 00:00:00 2001 From: dawidd6 Date: Mon, 23 Jan 2017 22:21:43 +0100 Subject: [PATCH 023/308] fix, when mpd server is on another host --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index fab4cb3a..134e62d2 100755 --- a/neofetch +++ b/neofetch @@ -1332,6 +1332,10 @@ get_song() { song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet /net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\ awk -F'"' '/artist/ {getline; a=$2} /title/ {getline; t=$2} END{print a " - " t}')" ;; + + *) + if type -p mpc >/dev/null; then song="$(mpc current)"; fi + ;; esac [[ "$(trim "$song")" = "-" ]] && unset -v song From 6ecaa950e00b5110e5caeb806945b4182a72c52e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 10:03:56 +1100 Subject: [PATCH 024/308] Ascii: Add a second color pooint to the Arch Linux logo --- ascii/distro/arch | 6 +++--- neofetch | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ascii/distro/arch b/ascii/distro/arch index d6fb1977..3de103bb 100644 --- a/ascii/distro/arch +++ b/ascii/distro/arch @@ -7,9 +7,9 @@ ${c1} -` `/:-:++oooo+: `/++++/+++++++: `/++++++++++++++: - `/+++ooooooooooooo/` - ./ooosssso++osssssso+` - .oossssso-````/ossssss+` + `/+++o${c2}oooooooo${c1}oooo/` +${c2} ${c1}./${c2}ooosssso++osssssso${c1}+` +${c2} .oossssso-````/ossssss+` -osssssso. :ssssssso. :osssssss/ osssso+++. /ossssssss/ +ssssooo/- diff --git a/neofetch b/neofetch index 1f764b9b..a98354cc 100755 --- a/neofetch +++ b/neofetch @@ -2674,7 +2674,7 @@ get_distro_colors() { ;; "Arch"*) - set_colors 4 7 1 + set_colors 4 4 7 1 ascii_file="arch" ;; From 0a70754ef1c82d8aa3ea89ddd77f1c27da99c349 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 10:11:35 +1100 Subject: [PATCH 025/308] Old Options: Fix birthday_time not working --- neofetch | 3 +++ 1 file changed, 3 insertions(+) diff --git a/neofetch b/neofetch index 9e05137a..59e93b35 100755 --- a/neofetch +++ b/neofetch @@ -3504,6 +3504,9 @@ old_options() { # Fahrenheit support was added to CPU so the options were changed. [[ "$cpu_temp" == "on" ]] && { err "Config: cpu_temp='on' is deprecated, use cpu_temp='C' or 'F' instead."; cpu_temp="C"; } + + # Birthday was renamed to Install Date in 3.0 + [[ -n "$birthday_time" ]] && { err "Config: \$birthday_time is deprecated, use \3install_time instead."; install_time="$birthday_time"; } } cache_uname() { From d68780385f71eff358dfe162125062be07324ce8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 10:23:07 +1100 Subject: [PATCH 026/308] Old Options: Fix progress bar options --- neofetch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 59e93b35..e6fd4520 100755 --- a/neofetch +++ b/neofetch @@ -3484,11 +3484,11 @@ old_options() { [[ -n "$image" ]] && { err "Config: \$image is deprecated, use \$image_source instead."; image_source="$image"; } # All progress_ variables were changed to bar_. - [[ -n "$progress_char" ]] && err "Config: \$progress_char is deprecated, use \$bar_char_elapsed and \$bar_char_total instead." - [[ -n "$progress_border" ]] && err "Config: \$progress_border is deprecated, use \$bar_border instead." - [[ -n "$progress_length" ]] && err "Config: \$progress_length is deprecated, use \$bar_length instead." - [[ -n "$progress_color_elapsed" ]] && err "Config: \$progress_color_elapsed is deprecated, use \$bar_color_elapsed instead." - [[ -n "$progress_color_total" ]] && err "Config: \$progress_color_total is deprecated, use \$bar_color_total instead." + [[ -n "$progress_char" ]] && err "Config: \$progress_char is deprecated, use \$bar_char_elapsed and \$bar_char_total instead." + [[ -n "$progress_border" ]] && { err "Config: \$progress_border is deprecated, use \$bar_border instead."; bar_border="$progress_border"; } + [[ -n "$progress_length" ]] && { err "Config: \$progress_length is deprecated, use \$bar_length instead."; bar_length="$progress_length"; } + [[ -n "$progress_color_elapsed" ]] && { err "Config: \$progress_color_elapsed is deprecated, use \$bar_color_elapsed instead."; bar_color_elapsed="$progress_color_elapsed"; } + [[ -n "$progress_color_total" ]] && { err "Config: \$progress_color_total is deprecated, use \$bar_color_total instead."; bar_color_total="$progress_color_total"; } # All cpufreq values were changed in 3.0. [[ "$speed_type" == "current" ]] && err "Config: speed_type='current' is deprecated, use speed_type='scaling_cur_freq' instead." From ee41671dec5507a0193e54bfe74ec8aed0b6d28d Mon Sep 17 00:00:00 2001 From: dawidd6 Date: Tue, 24 Jan 2017 00:31:53 +0100 Subject: [PATCH 027/308] rewrite mpc discovery --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 134e62d2..18175d38 100755 --- a/neofetch +++ b/neofetch @@ -1334,7 +1334,7 @@ get_song() { ;; *) - if type -p mpc >/dev/null; then song="$(mpc current)"; fi + mpc >/dev/null 2>&1 && song="$(mpc current)" ;; esac From a3c41033d2a3c5708c646a7f04c6b597bdc51217 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 11:48:09 +1100 Subject: [PATCH 028/308] Config: Remove '--config travis' in favor of '--config path/to/travis' --- .travis.yml | 2 +- neofetch | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 945902a7..f2566128 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 travis -v + - time ./neofetch --ascii --config config/travis -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/neofetch b/neofetch index e6fd4520..cdd30575 100755 --- a/neofetch +++ b/neofetch @@ -3299,7 +3299,6 @@ get_default_config() { else [[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")" default_config="${script_dir%/*}/config/config" - travis_config="${script_dir%/*}/config/travis" fi if source "$default_config"; then @@ -3316,12 +3315,6 @@ get_user_config() { err "Config: Sourced user config. (${config_file})" old_options return - - elif [[ "$config_file" == "travis" ]]; then - source "$travis_config" - err "Config: Sourced user config. (${travis_config})" - old_options - return fi mkdir -p "${XDG_CONFIG_HOME}/neofetch/" From 6460c1082ccc9bbab6b3180f554053b0cb4150f5 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 12:01:39 +1100 Subject: [PATCH 029/308] Docs: CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e938daa..de1f77fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - **[@SomaUlte](https://github.com/SomaUlte)** - **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- **[@dawidd6](https://github.com/dawidd6)** ## Info @@ -14,6 +15,10 @@ - Fixed issue with `color_blocks="off"` adding an extra newline to the output. +**Song**
+ +- Fixed `mpd` detection when `mpd` is on a different host. **[@dawidd6](https://github.com/dawidd6)** + ## Images - [iTerm2] Fixed issue with linebreaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** From 0fed289d58bb5f0675ebed37f5bb71b11ad54b9e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 12:18:44 +1100 Subject: [PATCH 030/308] Config: Fix config error on macOS --- neofetch | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 611c445a..48825845 100755 --- a/neofetch +++ b/neofetch @@ -3297,6 +3297,9 @@ get_default_config() { if [[ -f "/etc/neofetch/config" ]]; then default_config="/etc/neofetch/config" + elif [[ -f "/usr/local/etc/neofetch/config" ]]; then + default_config="/usr/local/etc/neofetch/config" + elif [[ -f "/data/data/com.termux/files/etc/neofetch/config" ]]; then default_config="/data/data/com.termux/files/etc/neofetch/config" @@ -3327,11 +3330,11 @@ get_user_config() { if [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then config_file="${XDG_CONFIG_HOME}/neofetch/config" - elif [[ -f "/usr/share/neofetch/config" ]]; then + elif [[ -f "/etc/neofetch/config" ]]; then cp "/usr/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch" config_file="${XDG_CONFIG_HOME}/neofetch/config" - elif [[ -f "/usr/local/share/neofetch/config" ]]; then + 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" From 589c54a2add5fb15437a39ed767c69e551a8a422 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 12:21:05 +1100 Subject: [PATCH 031/308] Docs: Changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index de1f77fd..a1f27eb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ - **[@dawidd6](https://github.com/dawidd6)** +## Config + +- Fixed default config not found. + + ## Info **GPU**
@@ -19,6 +24,7 @@ - Fixed `mpd` detection when `mpd` is on a different host. **[@dawidd6](https://github.com/dawidd6)** + ## Images - [iTerm2] Fixed issue with linebreaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** From 8325a87addb5bbb2d3276015b6f5cabac0cd5aa0 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 14:24:39 +1100 Subject: [PATCH 032/308] Config: Remove locale setting from user config --- config/config | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/config b/config/config index 37907b80..82340cdc 100644 --- a/config/config +++ b/config/config @@ -3,9 +3,6 @@ # Neofetch config file # https://github.com/dylanaraps/neofetch -# Speed up script by not using unicode -export LC_ALL=C -export LANG=C # See this wiki page for more info: # https://github.com/dylanaraps/neofetch/wiki/Customizing-Info From 8b87e9978e44fd485a1ef7b1d250566538d82c92 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 14:25:17 +1100 Subject: [PATCH 033/308] Docs: Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1f27eb2..ebe43d97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ## Config - Fixed default config not found. +- Don't set locale in config file. ## Info From 32c4b00bfd82a83b1cf0cf808951837f0272e36d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 23:41:48 +1100 Subject: [PATCH 034/308] Ascii: [Windows 10] Fix ascii_distro not working --- neofetch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 48825845..a739039e 100755 --- a/neofetch +++ b/neofetch @@ -59,7 +59,6 @@ get_distro() { "tiny") distro="Windows 10" ;; *) distro="$(lsb_release -sd) on Windows 10" ;; esac - ascii_distro="Windows 10" elif [[ -f "/etc/GoboLinuxVersion" ]]; then case "$distro_shorthand" in @@ -3143,7 +3142,7 @@ get_distro_colors() { ascii_file="void" ;; - "Windows 8"* | "Windows 10"*) + *"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"*) set_colors 6 7 ascii_file="windows10" ;; From 6e527038d8d11a64f9f5dd281f9072ebce4de67c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 24 Jan 2017 23:56:01 +1100 Subject: [PATCH 035/308] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebe43d97..b43ef3c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,3 +29,7 @@ ## Images - [iTerm2] Fixed issue with linebreaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** + +## Ascii + +- [Windows 10] Fixed `ascii_distro` not working. From bade83d5d580a092ae89ffd62ec458e89dbed28e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 25 Jan 2017 00:49:14 +1100 Subject: [PATCH 036/308] Shell: Fix shell version on bash 3 --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index a739039e..3fe0c33b 100755 --- a/neofetch +++ b/neofetch @@ -525,7 +525,7 @@ get_shell() { esac if [[ "$shell_version" == "on" ]]; then - case "${SHELL##*/}" in + case "${shell_name:=${SHELL##*/}}" in "bash") shell+="${BASH_VERSION/-*}" ;; "sh" | "ash" | "dash") ;; @@ -537,7 +537,7 @@ get_shell() { *) shell+="$("$SHELL" --version 2>&1)" - shell="${shell/ ${SHELL##*/}}" + shell="${shell/ "${shell_name}"}" ;; esac From 4064f4340bb3263d0f4dceb749962aacb8efd733 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 25 Jan 2017 10:36:17 +1100 Subject: [PATCH 037/308] OS: Added support for ArchBox. Closes #634 --- ascii/distro/archbox | 19 +++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 ascii/distro/archbox diff --git a/ascii/distro/archbox b/ascii/distro/archbox new file mode 100644 index 00000000..a35a15c6 --- /dev/null +++ b/ascii/distro/archbox @@ -0,0 +1,19 @@ +${c1} ...:+oh/:::.. + ..-/oshhhhhh` `::::-. + .:/ohhhhhhhhhhhh` `-::::. + .+shhhhhhhhhhhhhhhhh` `.::-. + /`-:+shhhhhhhhhhhhhh` .-/+shh + / .:/ohhhhhhhhh` .:/ohhhhhhhh + / `-:+shhh` ..:+shhhhhhhhhhhh + / .:ohhhhhhhhhhhhhhhhhhh + / `hhhhhhhhhhhhhhhhhhhh + / `hhhhhhhhhhhhhhhhhhhh + / `hhhhhhhhhhhhhhhhhhhh + / `hhhhhhhhhhhhhhhhhhhh + / .+o+ `hhhhhhhhhhhhhhhhhhhh + / -hhhhh `hhhhhhhhhhhhhhhhhhhh + / ohhhhho `hhhhhhhhhhhhhhhhhhhh + /:::+`hhhhoos` `hhhhhhhhhhhhhhhhhs+` + `--/:` /: `hhhhhhhhhhhho/- + -/:. `hhhhhhs+:-` + ::::/ho/-` diff --git a/neofetch b/neofetch index 3fe0c33b..234c06e0 100755 --- a/neofetch +++ b/neofetch @@ -2677,6 +2677,11 @@ get_distro_colors() { ascii_file="arch_old" ;; + "ArchBox"*) + set_colors 2 7 1 + ascii_file="archbox" + ;; + "Arch"*) set_colors 4 4 7 1 ascii_file="arch" From 83c57513950cc49ea5e240b8e61fb4fc74f0c2fd Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 25 Jan 2017 10:37:15 +1100 Subject: [PATCH 038/308] Docs: Changelog --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b43ef3c5..5bb87723 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ - **[@dawidd6](https://github.com/dawidd6)** +## Operating System + +- Added support for ArchBox Linux. + + ## Config - Fixed default config not found. @@ -13,6 +18,10 @@ ## Info +**Shell**
+ +- Fixed a crash when the user has `bash 3` installed. + **GPU**
- [Linux] Display detailed information about Intel GPUs. **[@SomaUlte](https://github.com/SomaUlte)** From bc0118a759688bd9a9d27d105fd64b7b690342ce Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 25 Jan 2017 11:56:33 +1100 Subject: [PATCH 039/308] Ascii: Fix bug where source is an image --- neofetch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 234c06e0..64010967 100755 --- a/neofetch +++ b/neofetch @@ -2011,11 +2011,18 @@ image_backend() { } get_ascii() { - if [[ ! -f "$image_source" || "$image_source" =~ (auto|ascii) ]]; then + if [[ ! -f "$image_source" || + "$image_source" =~ (auto|ascii) || + "$image_source" =~ \.(png|jpg|jpe|jpeg|gif) ]]; then + # Fallback to distro ascii mode if custom ascii isn't found. [[ ! "$image_source" =~ (auto|ascii) ]] && \ err "Ascii: Ascii file not found, using distro ascii." + # Fallback to distro ascii mode if source is an image. + [[ "$image_source" =~ \.(png|jpg|jpe|jpeg|gif) ]] && \ + err "Image: Source is image file but ascii backend was selected. Using distro ascii." + if [[ -d "/usr/share/neofetch/ascii/distro" ]]; then ascii_dir="/usr/share/neofetch/ascii/distro" From 237eeeb8332fe9c363056da707988d2d920879e5 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 25 Jan 2017 11:57:23 +1100 Subject: [PATCH 040/308] Docs: Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bb87723..39c11811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,8 @@ - [iTerm2] Fixed issue with linebreaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** + ## Ascii - [Windows 10] Fixed `ascii_distro` not working. +- Fixed a bug where the backend is `ascii` but the image_source is an image file. From f3b803ae38b4f3754432d8f857adc800040fa9f8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 25 Jan 2017 12:17:29 +1100 Subject: [PATCH 041/308] Image: Fix images in Terminology and Tmux --- neofetch | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 64010967..cf78c057 100755 --- a/neofetch +++ b/neofetch @@ -1987,7 +1987,6 @@ image_backend() { clear zws="​ " else - unset image_program to_ascii "Image: Failed to find terminal window size." err "Image: Check the 'Images in the terminal' wiki page for more info," return @@ -2195,7 +2194,7 @@ get_term_size() { printf "%b" "\033Ptmux;\033\033[14t\033\033[c\033\\" read_flags=(-d c) - elif [[ "$image_program" == "tycat" ]]; then + elif [[ "$image_backend" == "tycat" ]]; then printf "%b" "\033}qs\000" else @@ -2209,7 +2208,7 @@ get_term_size() { IFS=";" read -s -t 1 "${read_flags[@]}" -r -a term_size # Split the string into height/width. - if [[ "$image_program" == "tycat" ]]; then + if [[ "$image_backend" == "tycat" ]]; then term_width="$((term_size[2] * term_size[0]))" term_height="$((term_size[3] * term_size[1]))" @@ -2219,7 +2218,7 @@ get_term_size() { fi # Get terminal width/height if \033[14t is unsupported. - if [[ -z "$term_width" && "$image_program" == "w3m" ]]; then + if [[ -z "$term_width" && "$image_backend" == "w3m" ]]; then if type -p xdotool >/dev/null 2>&1; then current_window="$(xdotool getactivewindow)" source <(xdotool getwindowgeometry --shell "$current_window") @@ -4067,7 +4066,7 @@ main() { # w3m-img: Draw the image a second time to fix # rendering issues in specific terminal emulators. - [[ "$image_program" == *w3m* ]] && display_image 2>/dev/null + [[ "$image_backend" == *w3m* ]] && display_image 2>/dev/null # Take a screenshot. [[ "$scrot" == "on" ]] && take_scrot From 0bca00a1168dd9064400026d25af70ece553f226 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 25 Jan 2017 12:18:38 +1100 Subject: [PATCH 042/308] Docs: Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39c11811..2b183c77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,8 @@ ## Images - [iTerm2] Fixed issue with linebreaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- Fixed issue with images not working in Terminology. +- [w3m-img] Fixed issues with `w3m-img` and `tmux`. ## Ascii From 87cfcfc72a22ed62b832364f989e3a328ea2f153 Mon Sep 17 00:00:00 2001 From: "Ryan S. Northrup" Date: Wed, 25 Jan 2017 15:15:22 -0800 Subject: [PATCH 043/308] Fix paths for "proper" Haiku installation Recommendation: consider working out some way for there to be a standard `$PREFIX` variable for this, and some other way to populate this correctly based on the `$PREFIX` passed to `make install`. --- neofetch | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neofetch b/neofetch index cf78c057..908a7a04 100755 --- a/neofetch +++ b/neofetch @@ -2030,6 +2030,9 @@ get_ascii() { elif [[ -d "/data/data/com.termux/files/usr/share/neofetch/ascii/distro" ]]; then ascii_dir="/data/data/com.termux/files/usr/share/neofetch/ascii/distro" + + elif [[ -d "/boot/home/config/non-packaged/share/neofetch/ascii/distro" ]]; then + ascii_dir="/boot/home/config/non-packaged/share/neofetch/ascii/distro" else [[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")" @@ -3312,6 +3315,9 @@ get_default_config() { elif [[ -f "/data/data/com.termux/files/etc/neofetch/config" ]]; then default_config="/data/data/com.termux/files/etc/neofetch/config" + + elif [[ -f "/boot/home/config/non-packaged/etc/neofetch/config" ]]; then + default_config="/boot/home/config/non-packaged/etc/neofetch/config" else [[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")" From 8884b19e82eda578e161d85725b90b8a3ac7f761 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 16:37:52 +1100 Subject: [PATCH 044/308] Song: Fix album name being used as artist name --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index cf78c057..1c23d061 100755 --- a/neofetch +++ b/neofetch @@ -1342,7 +1342,7 @@ get_song() { # Display Artist and Title on separate lines. if [[ "$song_shorthand" == "on" ]]; then artist="${song/ -*}" - song="${song/$artist - }" + song="${song/*-}" if [[ "$song" != "$artist" ]]; then prin "Artist" "$artist" From 1c24b007c038f88c13fb931944587b334c57f94f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 16:52:51 +1100 Subject: [PATCH 045/308] Github: Require config file for new issues --- .github/ISSUE_TEMPLATE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 5c8469a8..e51b6bbd 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -7,6 +7,8 @@ If you're suggesting a new feature then just a description will suffice. ## Screenshot +## Config file + ## Verbose log 1. Run `neofetch -vv 2> neofetchlog` From a6c5c64beabceec3992414f1ddbaf2d5711bef5f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 17:51:36 +1100 Subject: [PATCH 046/308] General: Fix output if subtitles are disabled and prin is used --- movies.txt | 9 +++++++++ neofetch | 18 ++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 movies.txt diff --git a/movies.txt b/movies.txt new file mode 100644 index 00000000..412249de --- /dev/null +++ b/movies.txt @@ -0,0 +1,9 @@ +ascii +CHANGELOG.md +config +LICENSE.md +Makefile +movies.txt +neofetch +neofetch.1 +README.md diff --git a/neofetch b/neofetch index 1c23d061..f8bcd71f 100755 --- a/neofetch +++ b/neofetch @@ -1093,7 +1093,7 @@ get_gpu() { gpu="${gpu/Intel }" fi - prin "${subtitle}${gpu_num}" "$gpu" + prin "${subtitle:+${subtitle}${gpu_name}}" "$gpu" ((++gpu_num)) done @@ -1748,7 +1748,7 @@ get_disk() { esac # Append '(disk mount point)' to the subtitle. - prin "${subtitle} (${disk_sub})" "$disk" + prin "${subtitle:+${subtitle} (${disk_sub})}" "$disk" done } @@ -1774,7 +1774,7 @@ get_battery() { "barinfo") battery="$(bar "$capacity" 100) ${battery}" ;; esac - prin "${subtitle}${bat: -1}" "$battery" + prin "${subtitle:+${subtitle}${bat: -1}}" "$battery" done return ;; @@ -2519,7 +2519,7 @@ scrot_program() { info() { # Save subtitle value. - subtitle="$1" + [[ "$2" ]] && subtitle="$1" # Make sure that $prin is unset. unset -v prin @@ -2544,14 +2544,20 @@ info() { else err "Info: Couldn't detect ${1}." fi + + unset -v subtitle } prin() { # If $2 doesn't exist we format $1 as info. - [[ -z "$2" ]] && local subtitle_color="$info_color" + if [[ "$(trim "$1")" && "$2" ]]; then + string="${1//$'\033[0m'}${2:+: $2}" + else + string="${2:-$1}" + local subtitle_color="$info_color" + fi # Format the output. - string="${1//$'\033[0m'}${2:+: $2}" string="$(trim "$string")" string="${string/:/${reset}${colon_color}:${info_color}}" string="${subtitle_color}${bold}${string}" From e85133af65a1bd6733d3563766aa4d4a8a120025 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 17:53:14 +1100 Subject: [PATCH 047/308] General: Fix output if subtitles are disabled and prin is used --- movies.txt | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 movies.txt diff --git a/movies.txt b/movies.txt deleted file mode 100644 index 412249de..00000000 --- a/movies.txt +++ /dev/null @@ -1,9 +0,0 @@ -ascii -CHANGELOG.md -config -LICENSE.md -Makefile -movies.txt -neofetch -neofetch.1 -README.md From 1ea6b88b5bb474f16f7aa09016f9ab164c79cfdc Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 18:05:46 +1100 Subject: [PATCH 048/308] Travis: Test subtitles and prin --- config/travis | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/travis b/config/travis index ff4435fe..3050113f 100644 --- a/config/travis +++ b/config/travis @@ -38,6 +38,15 @@ print_info() { info line_break info cols info line_break + + # Testing + prin "prin" + prin "prin" "prin" + info underline + + # Testing no subtitles. + info uptime + info disk } refresh_rate="on" From 8ebd3ed98114361709b3faeb6dbf9949b2d27bb0 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 18:06:54 +1100 Subject: [PATCH 049/308] Travis: Don't print subtitle --- config/travis | 1 - 1 file changed, 1 deletion(-) diff --git a/config/travis b/config/travis index 3050113f..1fa6eaeb 100644 --- a/config/travis +++ b/config/travis @@ -42,7 +42,6 @@ print_info() { # Testing prin "prin" prin "prin" "prin" - info underline # Testing no subtitles. info uptime From 7f5554ac6cd7e711ea787985cc54bbf54b519d06 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Thu, 26 Jan 2017 08:19:44 +0100 Subject: [PATCH 050/308] Song: Fix typo --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index cf78c057..a6bcb872 100755 --- a/neofetch +++ b/neofetch @@ -1337,7 +1337,7 @@ get_song() { ;; esac - [[ "$(trim "$song")" = "-" ]] && unset -v song + [[ "$(trim "$song")" == "-" ]] && unset -v song # Display Artist and Title on separate lines. if [[ "$song_shorthand" == "on" ]]; then From afb5234e9ebf1df143211a04e6ba663ef0fb329c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 18:21:25 +1100 Subject: [PATCH 051/308] Docs: Changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b183c77..b6c1c9f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ - Added support for ArchBox Linux. +## General + +- Fix output if subtitles are disabled and `prin` is used in an info function. + + ## Config - Fixed default config not found. From 58a57bb15321680bb1df451d86711cbb9b45d03f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 18:37:13 +1100 Subject: [PATCH 052/308] Images: Fix cd error --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index f8bcd71f..7f9d5cc9 100755 --- a/neofetch +++ b/neofetch @@ -2075,7 +2075,7 @@ get_ascii() { get_image_source() { case "$image_source" in - "auto" | "wallpaper") + "auto" | "wall" | "wallpaper") get_wallpaper 2>/dev/null ;; From a9a3d9e5e73d671845803f3d9a8dead8dabf74bc Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 18:38:58 +1100 Subject: [PATCH 053/308] Docs: Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6c1c9f4..76485e31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ - [iTerm2] Fixed issue with linebreaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** - Fixed issue with images not working in Terminology. +- Fixed issue when `image_source` was set to `wall`. - [w3m-img] Fixed issues with `w3m-img` and `tmux`. From 01b3df7cd2524ad423b28c53945da6683147a4f7 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 18:41:03 +1100 Subject: [PATCH 054/308] Error: Add quotes to image --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 7f9d5cc9..dea0e0b1 100755 --- a/neofetch +++ b/neofetch @@ -2095,7 +2095,7 @@ get_image_source() { ;; esac - err "Image: Using image $image" + err "Image: Using image '$image'" } get_wallpaper() { From cfdaac34f2b12fe3d252c2e854655e5f8fe01131 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 19:00:48 +1100 Subject: [PATCH 055/308] Disk: Show disk name when subtitle is disabled --- neofetch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index dea0e0b1..daf91564 100755 --- a/neofetch +++ b/neofetch @@ -1748,7 +1748,11 @@ get_disk() { esac # Append '(disk mount point)' to the subtitle. - prin "${subtitle:+${subtitle} (${disk_sub})}" "$disk" + if [[ -z "$subtitle" ]]; then + prin "${disk_sub}" "$disk" + else + prin "${subtitle} (${disk_sub})}" "$disk" + fi done } From e66b63d0f326bd6865ae027397ef0d9139351344 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Thu, 26 Jan 2017 09:03:35 +0100 Subject: [PATCH 056/308] Song: Use get_song_dbus for audacious --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index a6bcb872..2aab713f 100755 --- a/neofetch +++ b/neofetch @@ -1281,9 +1281,9 @@ get_song() { "google play"*) song="$(gpmdp-remote current)" ;; "rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;; "deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;; - "audacious"*) song="$(audtool current-song)" ;; "xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;; "qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;; + "audacious"*) get_song_dbus "audacious" ;; "gnome-music"*) get_song_dbus "GnomeMusic" ;; "lollypop"*) get_song_dbus "Lollypop" ;; "clementine"*) get_song_dbus "clementine" ;; From 502f4834fb559cfeb858e09838baecae5df62b6f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 19:03:56 +1100 Subject: [PATCH 057/308] Distro: Use kernel_version in Windows detection --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index daf91564..8b8b8468 100755 --- a/neofetch +++ b/neofetch @@ -53,7 +53,7 @@ get_distro() { case "$os" in "Linux" | "BSD" | "MINIX") - if [[ "$(< /proc/version)" == *"Microsoft"* || "$(< /proc/sys/kernel/osrelease)" == *"Microsoft"* ]]; then + if [[ "$(< /proc/version)" == *"Microsoft"* || "$kernel_version" == *"Microsoft"* ]]; then case "$distro_shorthand" in "on") distro="$(lsb_release -sir) [Windows 10]" ;; "tiny") distro="Windows 10" ;; From c7892a70c73da8dc4e107795e04aaad5c842ff2b Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Thu, 26 Jan 2017 09:05:24 +0100 Subject: [PATCH 058/308] Song: Don't print empty song with song_shorthand --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 2aab713f..402033ce 100755 --- a/neofetch +++ b/neofetch @@ -1340,7 +1340,7 @@ get_song() { [[ "$(trim "$song")" == "-" ]] && unset -v song # Display Artist and Title on separate lines. - if [[ "$song_shorthand" == "on" ]]; then + if [[ "$song_shorthand" == "on" && "$song" ]]; then artist="${song/ -*}" song="${song/$artist - }" From ca0fc103f139f1c20ad87d0865e86dfe002a6e6a Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 20:10:33 +1100 Subject: [PATCH 059/308] Docs: Changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76485e31..372a3be4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - **[@SomaUlte](https://github.com/SomaUlte)** - **[@jorgegonzalez](https://github.com/jorgegonzalez)** - **[@dawidd6](https://github.com/dawidd6)** +- **[@mstraube](https://github.com/mstraube)** ## Operating System @@ -37,7 +38,9 @@ **Song**
+- Don't print `$song` if it's empty and `song_shorthand` is on. **[@mstraube](https://github.com/mstraube)** - Fixed `mpd` detection when `mpd` is on a different host. **[@dawidd6](https://github.com/dawidd6)** +- Use `get_song_dbus` for Audacious. **[@mstraube](https://github.com/mstraube)** ## Images From b22b748af9be65b9ada764c5039e3e71ddc64004 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 20:56:24 +1100 Subject: [PATCH 060/308] Config: Bump config version --- config/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config b/config/config index 82340cdc..2d07b6a6 100644 --- a/config/config +++ b/config/config @@ -707,4 +707,4 @@ image_host="teknik" # # NOTE: Don't change this value, neofetch reads this to determine # how to handle backwards compatibility. -config_version="2.1.0" +config_version="3.0.1" From 430f5af5646a06f87cce632d6e091a75156a0ccd Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 22:36:08 +1100 Subject: [PATCH 061/308] Ascii: Fix ascii file not working --- neofetch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index b2a76044..d3c278c0 100755 --- a/neofetch +++ b/neofetch @@ -2015,15 +2015,15 @@ image_backend() { get_ascii() { if [[ ! -f "$image_source" || - "$image_source" =~ (auto|ascii) || - "$image_source" =~ \.(png|jpg|jpe|jpeg|gif) ]]; then + "$image_source" =~ ^(auto|ascii)$ || + "$image_source" =~ \.(png|jpg|jpe|jpeg|gif)$ ]]; then # Fallback to distro ascii mode if custom ascii isn't found. - [[ ! "$image_source" =~ (auto|ascii) ]] && \ + [[ ! "$image_source" =~ (auto|ascii)$ ]] && \ err "Ascii: Ascii file not found, using distro ascii." # Fallback to distro ascii mode if source is an image. - [[ "$image_source" =~ \.(png|jpg|jpe|jpeg|gif) ]] && \ + [[ "$image_source" =~ \.(png|jpg|jpe|jpeg|gif)$ ]] && \ err "Image: Source is image file but ascii backend was selected. Using distro ascii." if [[ -d "/usr/share/neofetch/ascii/distro" ]]; then From c0e3a13f9d7aa582fae82767b8a0b78ea3909979 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 22:46:39 +1100 Subject: [PATCH 062/308] General: More regex fixes --- neofetch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index f9d461c2..91a83e74 100755 --- a/neofetch +++ b/neofetch @@ -583,7 +583,7 @@ get_de() { # the desktop variables are sometimes also set to the # window manager name. This checks to see if WM == DE # and dicards the DE value. - [[ "$wm" && "$de" =~ $wm ]] && { unset -v de; return; } + [[ "$wm" && "$de" =~ ^$wm$ ]] && { unset -v de; return; } ;; esac @@ -1966,7 +1966,7 @@ get_cols() { # IMAGES image_backend() { - if [[ ! "$image_backend" =~ (off|ascii) ]]; then + if [[ ! "$image_backend" =~ ^(off|ascii)$ ]]; then if ! type -p convert >/dev/null 2>&1; then image_backend="ascii" err "Image: Imagemagick not found, falling back to ascii mode." @@ -2019,7 +2019,7 @@ get_ascii() { "$image_source" =~ \.(png|jpg|jpe|jpeg|gif)$ ]]; then # Fallback to distro ascii mode if custom ascii isn't found. - [[ ! "$image_source" =~ (auto|ascii)$ ]] && \ + [[ ! "$image_source" =~ ^(auto|ascii)$ ]] && \ err "Ascii: Ascii file not found, using distro ascii." # Fallback to distro ascii mode if source is an image. @@ -2034,7 +2034,7 @@ get_ascii() { elif [[ -d "/data/data/com.termux/files/usr/share/neofetch/ascii/distro" ]]; then ascii_dir="/data/data/com.termux/files/usr/share/neofetch/ascii/distro" - + elif [[ -d "/boot/home/config/non-packaged/share/neofetch/ascii/distro" ]]; then ascii_dir="/boot/home/config/non-packaged/share/neofetch/ascii/distro" @@ -3325,7 +3325,7 @@ get_default_config() { elif [[ -f "/data/data/com.termux/files/etc/neofetch/config" ]]; then default_config="/data/data/com.termux/files/etc/neofetch/config" - + elif [[ -f "/boot/home/config/non-packaged/etc/neofetch/config" ]]; then default_config="/boot/home/config/non-packaged/etc/neofetch/config" From 461bbb7b7e7c41fdde064bf9a8df7cc9eb20e7f3 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 26 Jan 2017 22:47:40 +1100 Subject: [PATCH 063/308] Docs: Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 372a3be4..26ee7ac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,3 +55,4 @@ - [Windows 10] Fixed `ascii_distro` not working. - Fixed a bug where the backend is `ascii` but the image_source is an image file. +- Fixed custom ascii files not working. From fae12fadf27b6af392dfa86ed0c7553edfd6b91a Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 27 Jan 2017 14:29:19 +1100 Subject: [PATCH 064/308] Memory: Change label to MiB from MB --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 91a83e74..ad707f5e 100755 --- a/neofetch +++ b/neofetch @@ -1250,7 +1250,7 @@ get_memory() { mem_used="$((mem_total - mem_free))" ;; esac - memory="${mem_used}MB / ${mem_total}MB" + memory="${mem_used}MiB / ${mem_total}MiB" # Bars. case "$memory_display" in From 568f52c3b995e68ed92e52e920d27f8f860be092 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 27 Jan 2017 14:35:04 +1100 Subject: [PATCH 065/308] Memory: Show MB on OS that output the memory as Megabytes --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index ad707f5e..647cdad9 100755 --- a/neofetch +++ b/neofetch @@ -1248,9 +1248,10 @@ get_memory() { mem_total="${mem_stat[11]/.*}" mem_free="${mem_stat[16]/.*}" mem_used="$((mem_total - mem_free))" + mem_label="MB" ;; esac - memory="${mem_used}MiB / ${mem_total}MiB" + memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}" # Bars. case "$memory_display" in From c4869f5e50ad724f75e1ef3e91ffcab490bcc7aa Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 27 Jan 2017 14:51:18 +1100 Subject: [PATCH 066/308] Disk: Fix stray bracket --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 91a83e74..b2a60827 100755 --- a/neofetch +++ b/neofetch @@ -1751,7 +1751,7 @@ get_disk() { if [[ -z "$subtitle" ]]; then prin "${disk_sub}" "$disk" else - prin "${subtitle} (${disk_sub})}" "$disk" + prin "${subtitle} (${disk_sub})" "$disk" fi done } From 3d1266199877686d23b0b0e85ca320032d650790 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 27 Jan 2017 15:51:11 +1100 Subject: [PATCH 067/308] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26ee7ac2..4c0fde7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,10 @@ ## Info +**Memory**
+ +- Changed memory label to `MiB` on OS that output memory in Mebibytes. + **Shell**
- Fixed a crash when the user has `bash 3` installed. From 9573eee324b59d5ae3991654e0d5028e20b28242 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 28 Jan 2017 03:01:11 +1100 Subject: [PATCH 068/308] Prin: Fix underline not working --- neofetch | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index b2a60827..5e4f8929 100755 --- a/neofetch +++ b/neofetch @@ -2541,11 +2541,9 @@ info() { output="$(trim "${!2:-${!1}}")" if [[ "$2" && "${output// }" ]]; then - length="$((${#1} + ${#output} + 2))" prin "$1" "$output" elif [[ "${output// }" ]]; then - [[ -z "$length" ]] && length="${#output}" prin "$output" else @@ -2558,14 +2556,20 @@ info() { prin() { # If $2 doesn't exist we format $1 as info. if [[ "$(trim "$1")" && "$2" ]]; then - string="${1//$'\033[0m'}${2:+: $2}" + string="${1}${2:+: $2}" else string="${2:-$1}" local subtitle_color="$info_color" fi + string="$(trim "${string//$'\033[0m'}")" + + # Log length if it doesn't exist. + if [[ -z "$length" ]]; then + length="$(strip_sequences "$string")" + length="${#length}" + fi # Format the output. - string="$(trim "$string")" string="${string/:/${reset}${colon_color}:${info_color}}" string="${subtitle_color}${bold}${string}" @@ -2582,9 +2586,10 @@ prin() { get_underline() { if [[ "$underline_enabled" == "on" ]]; then printf -v underline "%${length}s" - underline="${underline_color}${underline// /$underline_char}" + printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline// /$underline_char}${reset} " unset -v length fi + prin=1 } get_line_break() { @@ -2633,6 +2638,15 @@ trim_quotes() { printf "%s" "$trim_output" } +strip_sequences() { + strip="${1//$'\033['3?m}" + strip="${strip//$'\033['38\;5\;[0-9]m}" + strip="${strip//$'\033['38\;5\;[0-9][0-9]m}" + strip="${strip//$'\033['38\;5\;[0-9][0-9][0-9]m}" + + printf "%s\n" "$strip" +} + uppercase() { ((bash_version >= 4)) && printf "%s" "${1^}" } From ebba162affbb6a470836e1348ad2fd4c0d4f02ad Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 28 Jan 2017 03:05:19 +1100 Subject: [PATCH 069/308] General: Be less greedy --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 5e4f8929..24e3e6ff 100755 --- a/neofetch +++ b/neofetch @@ -2639,7 +2639,7 @@ trim_quotes() { } strip_sequences() { - strip="${1//$'\033['3?m}" + strip="${1//$'\033['3[0-9]m}" strip="${strip//$'\033['38\;5\;[0-9]m}" strip="${strip//$'\033['38\;5\;[0-9][0-9]m}" strip="${strip//$'\033['38\;5\;[0-9][0-9][0-9]m}" From 745665b9d1d33527f6d9da9ff664f12ea1f387f6 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 28 Jan 2017 07:19:51 +1100 Subject: [PATCH 070/308] Travis: Test underlines --- config/travis | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config/travis b/config/travis index 1fa6eaeb..34bdb023 100644 --- a/config/travis +++ b/config/travis @@ -39,13 +39,20 @@ print_info() { info cols info line_break - # Testing + # Testing. prin "prin" prin "prin" "prin" # Testing no subtitles. info uptime info disk + + # Testing underlines. + info "Memory" memory + info underline + + prin "This is a test" + info underline } refresh_rate="on" From 599ab60909fdb7173a66f476b96bcd075d66efe9 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 28 Jan 2017 07:26:43 +1100 Subject: [PATCH 071/308] Travis: Echo length of underline --- neofetch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/neofetch b/neofetch index 24e3e6ff..e9132210 100755 --- a/neofetch +++ b/neofetch @@ -2584,6 +2584,8 @@ prin() { } get_underline() { + echo "$length" + if [[ "$underline_enabled" == "on" ]]; then printf -v underline "%${length}s" printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline// /$underline_char}${reset} " From 728357f4ad447617bb929f22f621a0ec752d3763 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 28 Jan 2017 07:30:13 +1100 Subject: [PATCH 072/308] Underline: Fix travis --- neofetch | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/neofetch b/neofetch index e9132210..8aecade2 100755 --- a/neofetch +++ b/neofetch @@ -2584,11 +2584,9 @@ prin() { } get_underline() { - echo "$length" - if [[ "$underline_enabled" == "on" ]]; then printf -v underline "%${length}s" - printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline// /$underline_char}${reset} " + printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}${underline// /$underline_char}${reset} " unset -v length fi prin=1 From 3d0ea7c6a2448964893d2093b42395d1d29a9916 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 28 Jan 2017 08:18:09 +1100 Subject: [PATCH 073/308] Travis: Remove testing --- config/travis | 7 ------- 1 file changed, 7 deletions(-) diff --git a/config/travis b/config/travis index 34bdb023..903818f9 100644 --- a/config/travis +++ b/config/travis @@ -46,13 +46,6 @@ print_info() { # Testing no subtitles. info uptime info disk - - # Testing underlines. - info "Memory" memory - info underline - - prin "This is a test" - info underline } refresh_rate="on" From 608ea4770433e1e1ee2af0256079f6982974559d Mon Sep 17 00:00:00 2001 From: Tuomas Siipola Date: Sat, 28 Jan 2017 00:13:02 +0200 Subject: [PATCH 074/308] Ignore comments in Alacritty font detection --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index ab5f7a9b..964d69ce 100755 --- a/neofetch +++ b/neofetch @@ -1619,6 +1619,7 @@ get_term_font() { term_font="$(awk -F ':|#' '/normal:/ {getline; print}' "${XDG_CONFIG_HOME}/alacritty/alacritty.yml")" term_font="${term_font/*family:}" term_font="${term_font/$'\n'*}" + term_font="${term_font/\#*}" ;; "Apple_Terminal") From 2dce22bc6652d017c52397cc18b7f2e94dc25dfb Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 28 Jan 2017 11:40:42 +1100 Subject: [PATCH 075/308] Update CHANGELOG.md --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c0fde7f..d46057b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - **[@jorgegonzalez](https://github.com/jorgegonzalez)** - **[@dawidd6](https://github.com/dawidd6)** - **[@mstraube](https://github.com/mstraube)** +- **[@siiptuo](https://github.com/siiptuo)** ## Operating System @@ -13,7 +14,8 @@ ## General -- Fix output if subtitles are disabled and `prin` is used in an info function. +- Fixed output if subtitles are disabled and `prin` is used in an info function. +- Fixed underlines not working when used with `prin`. ## Config @@ -46,6 +48,10 @@ - Fixed `mpd` detection when `mpd` is on a different host. **[@dawidd6](https://github.com/dawidd6)** - Use `get_song_dbus` for Audacious. **[@mstraube](https://github.com/mstraube)** +**Terminal Font**
+ +- [Alacritty] Fixed font detection. **[@siiptuo](https://github.com/siiptuo)** + ## Images From bc13d6d5d74a1ef53b66cd30e42ff385343a7072 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 28 Jan 2017 15:43:02 +1100 Subject: [PATCH 076/308] Docs: Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d46057b7..651cdb84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - **[@jorgegonzalez](https://github.com/jorgegonzalez)** - **[@dawidd6](https://github.com/dawidd6)** - **[@mstraube](https://github.com/mstraube)** +- **[@YellowApple](https://github.com/YellowApple)** - **[@siiptuo](https://github.com/siiptuo)** @@ -16,6 +17,7 @@ - Fixed output if subtitles are disabled and `prin` is used in an info function. - Fixed underlines not working when used with `prin`. +- Fixed HAIKU install path. **[@YellowApple](https://github.com/YellowApple)** ## Config From 97a437b7edf4b8d054016c9a2e69181e6278c84a Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 28 Jan 2017 13:54:40 +0700 Subject: [PATCH 077/308] Config: Applied @fornwall's patch --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 75a39d38..39ad0ae0 100755 --- a/neofetch +++ b/neofetch @@ -3339,8 +3339,8 @@ get_default_config() { elif [[ -f "/usr/local/etc/neofetch/config" ]]; then default_config="/usr/local/etc/neofetch/config" - elif [[ -f "/data/data/com.termux/files/etc/neofetch/config" ]]; then - default_config="/data/data/com.termux/files/etc/neofetch/config" + 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 "/boot/home/config/non-packaged/etc/neofetch/config" ]]; then default_config="/boot/home/config/non-packaged/etc/neofetch/config" From 4fdf4366ad390b578ef7f8e5dae95710184bc24f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 29 Jan 2017 18:42:47 +1100 Subject: [PATCH 078/308] Scrot: Add message letting users now that a screenshot was taken --- neofetch | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 75a39d38..ad05c025 100755 --- a/neofetch +++ b/neofetch @@ -2454,7 +2454,16 @@ scrot_upload() { fi image_file="${scrot_dir}${scrot_name}" - printf "%s\n" "Uploading image..." + + # Print a message letting the user know we're uploading + # the screenshot. + printf "%s\r" "Uploading scrot" + sleep .2 + printf "%s\r" "Uploading scrot." + sleep .2 + printf "%s\r" "Uploading scrot.." + sleep .2 + printf "%s\r" "Uploading scrot..." case "$image_host" in "teknik") @@ -2518,6 +2527,16 @@ scrot_program() { esac fi + # Print a message letting the user know we're taking + # a screenshot. + printf "%s\r" "Taking scrot" + sleep .2 + printf "%s\r" "Taking scrot." + sleep .2 + printf "%s\r" "Taking scrot.." + sleep .2 + printf "%s\r" "Taking scrot..." + # Take the scrot. "${scrot_program[@]}" "$1" From 59cc08e51c492e533e82eaef12aee561568055ca Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 29 Jan 2017 18:43:45 +1100 Subject: [PATCH 079/308] Docs: Changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 651cdb84..a7245f49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,3 +68,9 @@ - [Windows 10] Fixed `ascii_distro` not working. - Fixed a bug where the backend is `ascii` but the image_source is an image file. - Fixed custom ascii files not working. + + +## Scrot + +- Add message to let users know that a screenshot was taken. + From 169887a931d2abc022ea0770d6e619c5f4be0697 Mon Sep 17 00:00:00 2001 From: Matthew T Hoare Date: Sun, 29 Jan 2017 20:35:11 +0000 Subject: [PATCH 080/308] ascii/distro/openbsd: removed extraneous backslashes to correct alignment. --- ascii/distro/openbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ascii/distro/openbsd b/ascii/distro/openbsd index e5749985..d3812019 100644 --- a/ascii/distro/openbsd +++ b/ascii/distro/openbsd @@ -7,8 +7,8 @@ ${c1} / ||\| Y J ) / |/| ./ J |)'( | ` F`.'/ ${c3} _ ${c1} -<| F __ .-< ${c3}(_) ${c1} | / .-'${c3}. ${c1}`. /${c3}-. ${c1}L___ - J \\ < ${c3}\ ${c1} | | ${c5}O${c3}\\\\${c1}|.-' ${c3} _ -${c1} _J \\ .- \\\\${c3}/ ${c5}O ${c3}| ${c1}| \\ |${c1}F ${c3}(_) + J \\ < ${c3}\ ${c1} | | ${c5}O${c3}\\${c1}|.-' ${c3} _ +${c1} _J \\ .- \\${c3}/ ${c5}O ${c3}| ${c1}| \\ |${c1}F ${c3}(_) ${c1} '-F -<_. \\ .-' `-' L__ __J _ _. >-' ${c1})${c4}._. ${c1}|-' ${c1} `-|.' /_. ${c4}\_| ${c1} F From 1abec603375e7ee92d93cfb16949086354327c18 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Jan 2017 10:56:02 +1100 Subject: [PATCH 081/308] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7245f49..f20b1862 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - **[@mstraube](https://github.com/mstraube)** - **[@YellowApple](https://github.com/YellowApple)** - **[@siiptuo](https://github.com/siiptuo)** +- **[@siiptuo](https://github.com/siiptuo)** +- **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)** ## Operating System @@ -68,6 +70,7 @@ - [Windows 10] Fixed `ascii_distro` not working. - Fixed a bug where the backend is `ascii` but the image_source is an image file. - Fixed custom ascii files not working. +- Removed extra backslashes from OpenBSD ascii art. **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)** ## Scrot From e2ac16028db8228b9c6ca30bec4bb5c4d1ffbb45 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Jan 2017 10:56:16 +1100 Subject: [PATCH 082/308] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f20b1862..250a4513 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,6 @@ - **[@mstraube](https://github.com/mstraube)** - **[@YellowApple](https://github.com/YellowApple)** - **[@siiptuo](https://github.com/siiptuo)** -- **[@siiptuo](https://github.com/siiptuo)** - **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)** From 54c61190418ccc40214a4be35965b21f1a9d67ba Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Jan 2017 11:03:39 +1100 Subject: [PATCH 083/308] Packages: Count chromebrew packages --- neofetch | 3 +++ 1 file changed, 3 insertions(+) diff --git a/neofetch b/neofetch index 90de1c99..95600e12 100755 --- a/neofetch +++ b/neofetch @@ -470,6 +470,9 @@ get_packages() { type -p pkg_info >/dev/null && \ packages="$((packages+=$(pkg_info | wc -l)))" + type -p crew >/dev/null && \ + packages="$((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)))" + if type -p pkg >/dev/null; then case "$kernel_name" in "FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;; From 4d546c4bc0bd9491a2761e58ad3d4ba3077d9de4 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Jan 2017 11:06:13 +1100 Subject: [PATCH 084/308] Docs: Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 250a4513..0e4f0685 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,10 @@ - Fixed a crash when the user has `bash 3` installed. +**Packages**
+ +- Added support for Chromebrew. + **GPU**
- [Linux] Display detailed information about Intel GPUs. **[@SomaUlte](https://github.com/SomaUlte)** From 8fce18fcaede81e9296914d56f29be8487eb6ca8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Jan 2017 19:44:12 +1100 Subject: [PATCH 085/308] General: Increment version number --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 95600e12..fcfe40f9 100755 --- a/neofetch +++ b/neofetch @@ -8,6 +8,9 @@ # Created by Dylan Araps # https://github.com/dylanaraps/ +# Neofetch version. +version="3.0.1" + bash_version="${BASH_VERSION/.*}" sys_locale="${LANG:-C}" XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}" @@ -3886,7 +3889,7 @@ exit 1 } version() { printf "%s" "\ -Neofetch 3.0.1 +Neofetch $version Copyright (c) 2016-2017 Dylan Araps From f1c2b955981a4991f20ed84c0bc902b91b7efc90 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Jan 2017 19:49:28 +1100 Subject: [PATCH 086/308] Docs: Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e4f0685..7c9ec382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,7 +62,7 @@ ## Images -- [iTerm2] Fixed issue with linebreaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- [iTerm2] Fixed issue with line-breaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** - Fixed issue with images not working in Terminology. - Fixed issue when `image_source` was set to `wall`. - [w3m-img] Fixed issues with `w3m-img` and `tmux`. From 04d194b9f9904f6ca7341a487944a195c3b57b58 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Jan 2017 19:52:06 +1100 Subject: [PATCH 087/308] Docs: Changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c9ec382..dcccf7e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +This minor release fixes all of the bugs that were found in the 3.0 release. + +Thanks for all of the bug reports and contributions. :) + + ## Contributors - **[@SomaUlte](https://github.com/SomaUlte)** @@ -7,6 +12,7 @@ - **[@YellowApple](https://github.com/YellowApple)** - **[@siiptuo](https://github.com/siiptuo)** - **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)** +- **[@konimex](https://github.com/konimex)** ## Operating System From 15a0738b1b44cc47e00bc8a650dd6a30e7ab28e0 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Jan 2017 19:53:09 +1100 Subject: [PATCH 088/308] Docs: Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcccf7e0..0cd58566 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -84,5 +84,5 @@ Thanks for all of the bug reports and contributions. :) ## Scrot -- Add message to let users know that a screenshot was taken. +- Added message to let users know that a screenshot was taken. From e44a06aa2cfb584f77f2296578058601d5180bed Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Jan 2017 19:56:01 +1100 Subject: [PATCH 089/308] Docs: Clear changelog --- CHANGELOG.md | 88 ---------------------------------------------------- 1 file changed, 88 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cd58566..e69de29b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,88 +0,0 @@ -This minor release fixes all of the bugs that were found in the 3.0 release. - -Thanks for all of the bug reports and contributions. :) - - -## Contributors - -- **[@SomaUlte](https://github.com/SomaUlte)** -- **[@jorgegonzalez](https://github.com/jorgegonzalez)** -- **[@dawidd6](https://github.com/dawidd6)** -- **[@mstraube](https://github.com/mstraube)** -- **[@YellowApple](https://github.com/YellowApple)** -- **[@siiptuo](https://github.com/siiptuo)** -- **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)** -- **[@konimex](https://github.com/konimex)** - - -## Operating System - -- Added support for ArchBox Linux. - - -## General - -- Fixed output if subtitles are disabled and `prin` is used in an info function. -- Fixed underlines not working when used with `prin`. -- Fixed HAIKU install path. **[@YellowApple](https://github.com/YellowApple)** - - -## Config - -- Fixed default config not found. -- Don't set locale in config file. - - -## Info - -**Memory**
- -- Changed memory label to `MiB` on OS that output memory in Mebibytes. - -**Shell**
- -- Fixed a crash when the user has `bash 3` installed. - -**Packages**
- -- Added support for Chromebrew. - -**GPU**
- -- [Linux] Display detailed information about Intel GPUs. **[@SomaUlte](https://github.com/SomaUlte)** - -**Color Blocks**
- -- Fixed issue with `color_blocks="off"` adding an extra newline to the output. - -**Song**
- -- Don't print `$song` if it's empty and `song_shorthand` is on. **[@mstraube](https://github.com/mstraube)** -- Fixed `mpd` detection when `mpd` is on a different host. **[@dawidd6](https://github.com/dawidd6)** -- Use `get_song_dbus` for Audacious. **[@mstraube](https://github.com/mstraube)** - -**Terminal Font**
- -- [Alacritty] Fixed font detection. **[@siiptuo](https://github.com/siiptuo)** - - -## Images - -- [iTerm2] Fixed issue with line-breaks printing spaces over the image. **[@jorgegonzalez](https://github.com/jorgegonzalez)** -- Fixed issue with images not working in Terminology. -- Fixed issue when `image_source` was set to `wall`. -- [w3m-img] Fixed issues with `w3m-img` and `tmux`. - - -## Ascii - -- [Windows 10] Fixed `ascii_distro` not working. -- Fixed a bug where the backend is `ascii` but the image_source is an image file. -- Fixed custom ascii files not working. -- Removed extra backslashes from OpenBSD ascii art. **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)** - - -## Scrot - -- Added message to let users know that a screenshot was taken. - From 8fb4aec1ed840f7d7e2ac93bb6ab1e3777bab632 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 30 Jan 2017 19:56:39 +1100 Subject: [PATCH 090/308] General: Bump version to 3.0.2 --- config/config | 2 +- neofetch | 2 +- neofetch.1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config b/config/config index 2d07b6a6..2a57fe3f 100644 --- a/config/config +++ b/config/config @@ -707,4 +707,4 @@ image_host="teknik" # # NOTE: Don't change this value, neofetch reads this to determine # how to handle backwards compatibility. -config_version="3.0.1" +config_version="3.0.2" diff --git a/neofetch b/neofetch index fcfe40f9..948651d2 100755 --- a/neofetch +++ b/neofetch @@ -9,7 +9,7 @@ # https://github.com/dylanaraps/ # Neofetch version. -version="3.0.1" +version="3.0.2" bash_version="${BASH_VERSION/.*}" sys_locale="${LANG:-C}" diff --git a/neofetch.1 b/neofetch.1 index ceec6390..8dd16156 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" "January 2017" "Neofetch 3.0.1" "User Commands" +.TH NEOFETCH "1" "January 2017" "Neofetch 3.0.2" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS From b4e5169aa93ae0e17bc329dfa82cc0a8dd478d05 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 31 Jan 2017 07:45:52 +1100 Subject: [PATCH 091/308] General: Simplified prompt calculation, un-hardcoded line breaks. Closes #652 --- neofetch | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/neofetch b/neofetch index 948651d2..5f2305fb 100755 --- a/neofetch +++ b/neofetch @@ -2625,6 +2625,7 @@ get_line_break() { # Calculate info height. ((++info_height)) + line_breaks+=$'\n' # Tell info() that we printed manually. prin=1 @@ -3497,34 +3498,27 @@ get_term_padding() { dynamic_prompt() { case "$image_backend" in - "ascii") ;; + "ascii") printf "\n" ;; "off") return ;; *) - get_term_padding 2>/dev/null - - # Calculate image height in terminal cells. - lines="$(((border * 2 + height + yoffset) / font_height))" + get_term_padding + lines="$(((border + height + yoffset) / font_height))" + image_prompt="on" ;; esac # If the info is higher than the ascii/image place the prompt # based on the info height instead of the ascii/image height. if ((lines < info_height)); then - printf "\n" + [[ "$image_prompt" ]] && printf "\n" return else + [[ "$image_prompt" ]] && printf "%b\n" "$line_breaks" lines="$((lines - info_height))" fi # Set the prompt location. - if ((lines < 0)); then - printf "%b" "\033[${lines/-}A" - else - printf "%b" "\033[${lines}B" - fi - - # Add some padding. - printf "\n\n\n\n" + ((lines > 0)) && printf "%b" "\033[${lines}B" } old_functions() { From bff259fdd0e2968b6f09b0ccbdb2ab8d120e94fe Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 31 Jan 2017 23:32:10 +1100 Subject: [PATCH 092/308] General: Fix prompt height when color blocks are disabled in config --- neofetch | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index 5f2305fb..63c9cd34 100755 --- a/neofetch +++ b/neofetch @@ -1949,22 +1949,22 @@ get_cols() { done # Convert height into spaces. - printf -v spaces "%${block_height}s" + printf -v block_spaces "%${block_height}s" # Convert the spaces into rows of blocks. - [[ "$blocks" ]] && cols+="${spaces// /${blocks}${reset}nl}" - [[ "$blocks2" ]] && cols+="${spaces// /${blocks2}${reset}nl}" + [[ "$blocks" ]] && cols+="${block_spaces// /${blocks}${reset}nl}" + [[ "$blocks2" ]] && cols+="${block_spaces// /${blocks2}${reset}nl}" # Add newlines to the string. cols="${cols%%'nl'}" cols="${cols//nl/\\n\\033[${text_padding}C${zws}}" + # Add block height to info height. + info_height="$((info_height+=block_height+2))" + printf "%b\n" "\033[${text_padding}C${zws}${cols}" - else - printf "\n" fi - info_height="$((info_height+=block_height+2))" unset -v blocks blocks2 cols # Tell info() that we printed manually. @@ -3517,6 +3517,9 @@ dynamic_prompt() { lines="$((lines - info_height))" fi + # Print a newline if color blocks are disabled. + [[ -z "$block_spaces" ]] && printf "\n" + # Set the prompt location. ((lines > 0)) && printf "%b" "\033[${lines}B" } From 6ee946410159a996aacda3184ced08a023c58800 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sun, 5 Feb 2017 17:14:30 +0100 Subject: [PATCH 093/308] Ascii: Parabola logo --- ascii/distro/parabola | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/ascii/distro/parabola b/ascii/distro/parabola index fb257c2b..33c38bd5 100644 --- a/ascii/distro/parabola +++ b/ascii/distro/parabola @@ -1,17 +1,16 @@ -${c1} eeeeeeeee - eeeeeeeeeeeeeee - eeeeee${c2}//////////${c1}eeeee - eeeee${c2}///////////////${c1}eeeee - eeeee${c2}/// ////${c1}eeee - eeee${c2}// ///${c1}eeeee - eee ${c2}///${c1}eeeee -ee ${c2}//${c1}eeeeee -e ${c2}/${c1}eeeeeee - eeeeeee - eeeeee - eeeeee - eeeee - eeee - eee - ee - e +${c1} `.-. `. + `.` `:++. `-+o+. + `` `:+/. `:+/. `-+oooo+ + ``-::-.:+/. `:+/. `-+oooooo+ + `.-:///- ..` .-. `-+oooooooo- + `..-..` `+ooooooooo: +`` :oooooooo/ + `ooooooo: + `oooooo: + -oooo+. + +ooo/` + -ooo- + `+o/. + /+- + //` + -. From 04d180c6f074531c340dad3d64eda62302ca8820 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 6 Feb 2017 08:13:04 +1100 Subject: [PATCH 094/308] Update CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29b..c7d35959 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +## Contributors + +- **[@mstraube](https://github.com/mstraube)** + +## Ascii + +- Update Parabola logo. **[@mstraube](https://github.com/mstraube)** From 69046ae124042e21b1324c884579eb3579d61be2 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 9 Feb 2017 10:23:21 +1100 Subject: [PATCH 095/308] Image: Added sixel backend --- neofetch | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/neofetch b/neofetch index 63c9cd34..d2c01906 100755 --- a/neofetch +++ b/neofetch @@ -1985,7 +1985,7 @@ image_backend() { "ascii") get_ascii ;; "off") image_backend="off" ;; - "caca" | "catimg" | "jp2a" | "iterm2" | "tycat" | "w3m") + "caca" | "catimg" | "jp2a" | "iterm2" | "tycat" | "w3m" | "sixel") get_image_source if [[ ! -f "$image" ]]; then @@ -1997,7 +1997,6 @@ image_backend() { if [[ "$term_width" ]] && ((term_width >= 1)); then clear - zws="​ " else to_ascii "Image: Failed to find terminal window size." err "Image: Check the 'Images in the terminal' wiki page for more info," @@ -2011,7 +2010,7 @@ image_backend() { *) err "Image: Unknown image backend specified '$image_backend'." - err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m')" + err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'tycat', 'w3m')" err "Image: Falling back to ascii mode." get_ascii ;; @@ -2384,23 +2383,23 @@ make_thumbnail() { display_image() { case "$image_backend" in "caca") - img2txt -W "$((width / font_width)))" -H "$((height / font_height))" --gamma=0.6 "$image" || to_off "Image: catimg failed to display the image." - zws= + img2txt -W "$((width / font_width)))" -H "$((height / font_height))" --gamma=0.6 "$image" || to_off "Image: libcaca failed to display the image." ;; "catimg") catimg -w "$((width * 2 / font_width))" -r 0 "$image" || to_off "Image: catimg failed to display the image." - zws= ;; "jp2a") jp2a --width="$((width / font_width))" --colors "$image" || to_off "Image: jp2a failed to display the image." - zws= + ;; + + "sixel") + img2sixel -w "$width" "$image" || to_off "Image: libsixel failed to display the image." ;; "iterm2") printf "%b\a\n" "\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")" - zws= ;; "tycat") @@ -2415,6 +2414,8 @@ display_image() { sleep 0.05 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="​ " ;; esac } @@ -2438,7 +2439,6 @@ to_off() { err "$1" image_backend="off" text_padding= - zws= } # SCREENSHOT @@ -3804,7 +3804,7 @@ BARS: IMAGE BACKEND: --backend backend Which image backend to use. - Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m' + Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'tycat', 'w3m' --source source Which image or ascii file to use. Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' --ascii source Shortcut to use 'ascii' backend. @@ -3812,6 +3812,7 @@ IMAGE BACKEND: --catimg source Shortcut to use 'catimg' backend. --iterm2 source Shortcut to use 'iterm2' backend. --jp2a source Shortcut to use 'jp2a' backend. + --sixel source Shortcut to use 'sixel' backend. --tycat source Shortcut to use 'tycat' backend. --w3m source Shortcut to use 'w3m' backend. --off Shortcut to use 'off' backend. @@ -4014,7 +4015,7 @@ get_args() { # Image backend "--backend") image_backend="$2" ;; "--source") image_source="$2" ;; - "--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--tycat" | "--w3m") + "--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--sixel" | "--tycat" | "--w3m") image_backend="${1/--}" case "$2" in "-"* | "") ;; From 2b2a9c19dc1f7922f883f172b62c7e64e8f1ae88 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 9 Feb 2017 10:24:58 +1100 Subject: [PATCH 096/308] Docs: CHANGELOG --- CHANGELOG.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7d35959..f4bcf72d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,14 @@ -## Contributors - -- **[@mstraube](https://github.com/mstraube)** - -## Ascii - -- Update Parabola logo. **[@mstraube](https://github.com/mstraube)** +## Contributors + +- **[@mstraube](https://github.com/mstraube)** + + +## Ascii + +- Update Parabola logo. **[@mstraube](https://github.com/mstraube)** + + +## Images + +- Added `libsixel` backend. +- Only use a zero width space in the `w3m` backend. From ca54e76f52350f49b3f7f3fa45ee6394102616da Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 9 Feb 2017 10:36:21 +1100 Subject: [PATCH 097/308] Images: Added termpix backend --- neofetch | 12 ++++++++---- neofetch.1 | 10 ++++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index d2c01906..988ff001 100755 --- a/neofetch +++ b/neofetch @@ -1985,7 +1985,7 @@ image_backend() { "ascii") get_ascii ;; "off") image_backend="off" ;; - "caca" | "catimg" | "jp2a" | "iterm2" | "tycat" | "w3m" | "sixel") + "caca" | "catimg" | "jp2a" | "iterm2" | "termpix" | "tycat" | "w3m" | "sixel") get_image_source if [[ ! -f "$image" ]]; then @@ -2010,7 +2010,7 @@ image_backend() { *) err "Image: Unknown image backend specified '$image_backend'." - err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'tycat', 'w3m')" + err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'termpix', 'tycat', 'w3m')" err "Image: Falling back to ascii mode." get_ascii ;; @@ -2398,6 +2398,10 @@ display_image() { img2sixel -w "$width" "$image" || to_off "Image: libsixel failed to display the image." ;; + "termpix") + termpix --width "$((width / font_width))" "$image" || to_off "Image: termpix failed to display the image." + ;; + "iterm2") printf "%b\a\n" "\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")" ;; @@ -3813,6 +3817,7 @@ IMAGE BACKEND: --iterm2 source Shortcut to use 'iterm2' backend. --jp2a source Shortcut to use 'jp2a' backend. --sixel source Shortcut to use 'sixel' backend. + --termpix source Shortcut to use 'termpix' backend. --tycat source Shortcut to use 'tycat' backend. --w3m source Shortcut to use 'w3m' backend. --off Shortcut to use 'off' backend. @@ -4015,7 +4020,7 @@ get_args() { # Image backend "--backend") image_backend="$2" ;; "--source") image_source="$2" ;; - "--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--sixel" | "--tycat" | "--w3m") + "--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--sixel" | "--termpix" | "--tycat" | "--w3m") image_backend="${1/--}" case "$2" in "-"* | "") ;; @@ -4112,7 +4117,6 @@ main() { printf "\033[?25l\033[?7l" fi - # get_image_backend image_backend old_functions get_cache_dir diff --git a/neofetch.1 b/neofetch.1 index 8dd16156..a51742df 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" "January 2017" "Neofetch 3.0.2" "User Commands" +.TH NEOFETCH "1" "February 2017" "Neofetch 3.0.2" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS @@ -175,7 +175,7 @@ Possible values: bar, infobar, barinfo, off .TP \fB\-\-backend\fR backend Which image backend to use. -Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m' +Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'tycat', 'w3m' .TP \fB\-\-source\fR source Which image or ascii file to use. @@ -196,6 +196,12 @@ Shortcut to use 'iterm2' backend. \fB\-\-jp2a\fR source Shortcut to use 'jp2a' backend. .TP +\fB\-\-sixel\fR source +Shortcut to use 'sixel' backend. +.TP +\fB\-\-termpix\fR source +Shortcut to use 'termpix' backend. +.TP \fB\-\-tycat\fR source Shortcut to use 'tycat' backend. .TP From 0af39a6d302608383800e1061d10e7ad8274a839 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 9 Feb 2017 10:36:54 +1100 Subject: [PATCH 098/308] Docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4bcf72d..b010e3c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,4 +11,5 @@ ## Images - Added `libsixel` backend. +- Added `termpix` backend. - Only use a zero width space in the `w3m` backend. From 199dadd537fa60cf8b98b010ea2f3b30503c0a86 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 9 Feb 2017 11:00:50 +1100 Subject: [PATCH 099/308] Images: Fix bug with getting terminal size --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 988ff001..814a8772 100755 --- a/neofetch +++ b/neofetch @@ -2232,7 +2232,7 @@ get_term_size() { fi # Get terminal width/height if \033[14t is unsupported. - if [[ -z "$term_width" && "$image_backend" == "w3m" ]]; then + if [[ -z "$term_width" ]]; then if type -p xdotool >/dev/null 2>&1; then current_window="$(xdotool getactivewindow)" source <(xdotool getwindowgeometry --shell "$current_window") From fefad4f98cb988e01d423f09bd369294a0a5ab84 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 9 Feb 2017 11:01:19 +1100 Subject: [PATCH 100/308] Docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b010e3c2..97dcd0e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,3 +13,4 @@ - Added `libsixel` backend. - Added `termpix` backend. - Only use a zero width space in the `w3m` backend. +- Fixed bug causing terminal size to not be found. From b9520300110a5783d97591e16ef8350d203438e2 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 17 Feb 2017 10:23:12 +1100 Subject: [PATCH 101/308] Song: Use audtool before falling back to dbus --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 814a8772..300a26cf 100755 --- a/neofetch +++ b/neofetch @@ -1290,7 +1290,7 @@ get_song() { "deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;; "xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;; "qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;; - "audacious"*) get_song_dbus "audacious" ;; + "audacious"*) audtool current-song || get_song_dbus "audacious" ;; "gnome-music"*) get_song_dbus "GnomeMusic" ;; "lollypop"*) get_song_dbus "Lollypop" ;; "clementine"*) get_song_dbus "clementine" ;; From 7afd5b2d2286ea332c604c5ae3eae947c23a6c10 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 19 Feb 2017 10:42:45 +1100 Subject: [PATCH 102/308] Song: Fix audacious fallback --- neofetch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 300a26cf..0c13f5e2 100755 --- a/neofetch +++ b/neofetch @@ -1290,7 +1290,6 @@ get_song() { "deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;; "xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;; "qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;; - "audacious"*) audtool current-song || get_song_dbus "audacious" ;; "gnome-music"*) get_song_dbus "GnomeMusic" ;; "lollypop"*) get_song_dbus "Lollypop" ;; "clementine"*) get_song_dbus "clementine" ;; @@ -1299,6 +1298,15 @@ get_song() { "guayadeque"*) get_song_dbus "guayadeque" ;; "yarock"*) get_song_dbus "yarock" ;; + "audacious"*) + song="$(audtool current-song)" + + # Remove Album from 'Artist - Album - Title' + song="${song/-* -/-}" + + [[ -z "$song" ]] && get_song_dbus "audacious" + ;; + "cmus"*) song="$(cmus-remote -Q | awk '/tag artist/ {$1=$2=""; print; print " - "} /tag title/ {$1=$2=""; print}')" ;; From 953979937fe5c8ae05d337538be28c9042583a9e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 19 Feb 2017 10:44:42 +1100 Subject: [PATCH 103/308] Docs: Changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97dcd0e3..c4cc09da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,3 +14,10 @@ - Added `termpix` backend. - Only use a zero width space in the `w3m` backend. - Fixed bug causing terminal size to not be found. + + +## Info + +**Song**
+ +- Fixed Audacious song output when `dbus-send` fails. **[@mstraube](https://github.com/mstraube)** From c583d06780443fe615223d3677f55e31556dc616 Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Wed, 22 Feb 2017 12:37:01 -0500 Subject: [PATCH 104/308] WM: Add support for Kwm on macOS --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 0c13f5e2..2d1f6f74 100755 --- a/neofetch +++ b/neofetch @@ -629,7 +629,10 @@ get_wm() { else case "$os" in - "Mac OS X") wm="Quartz Compositor" ;; + "Mac OS X") + wm="Quartz Compositor" + [[ "$(ps -e | grep '[k]wm')" ]] && wm="Kwm" + ;; "Windows") wm="$(tasklist | grep -m 1 -o -F -e "bugn" -e "Windawesome" -e "blackbox" -e "emerge" -e "litestep")" [[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)" From 8c3fef53963fc94f203d1752fd26aefb8de0cb99 Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Wed, 22 Feb 2017 17:19:52 -0500 Subject: [PATCH 105/308] Modify ps line --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 2d1f6f74..c0051833 100755 --- a/neofetch +++ b/neofetch @@ -631,7 +631,7 @@ get_wm() { case "$os" in "Mac OS X") wm="Quartz Compositor" - [[ "$(ps -e | grep '[k]wm')" ]] && wm="Kwm" + ps -e | grep -F -q "kwm" && wm="Kwm" ;; "Windows") wm="$(tasklist | grep -m 1 -o -F -e "bugn" -e "Windawesome" -e "blackbox" -e "emerge" -e "litestep")" From 07ade10735f924f83a1b206ce299105ce8a93d97 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 23 Feb 2017 12:48:56 +1100 Subject: [PATCH 106/308] Docs: Changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4cc09da..4c90eb4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Contributors - **[@mstraube](https://github.com/mstraube)** +- **[@jorgegonzalez](https://github.com/jorgegonzalez)** ## Ascii @@ -18,6 +19,10 @@ ## Info +**Window Manager**
+ +- [MacOS] Added support for Kwm. **[@jorgegonzalez](https://github.com/jorgegonzalez)** + **Song**
- Fixed Audacious song output when `dbus-send` fails. **[@mstraube](https://github.com/mstraube)** From 110e95a194b09680ad2a92353314ace055ca498f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 23 Feb 2017 13:54:52 +1100 Subject: [PATCH 107/308] Revert "WM: Add support for Kwm on macOS" --- neofetch | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/neofetch b/neofetch index c0051833..0c13f5e2 100755 --- a/neofetch +++ b/neofetch @@ -629,10 +629,7 @@ get_wm() { else case "$os" in - "Mac OS X") - wm="Quartz Compositor" - ps -e | grep -F -q "kwm" && wm="Kwm" - ;; + "Mac OS X") wm="Quartz Compositor" ;; "Windows") wm="$(tasklist | grep -m 1 -o -F -e "bugn" -e "Windawesome" -e "blackbox" -e "emerge" -e "litestep")" [[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)" From 9becea4febdaa284aa3f5baac23c83a9abf40f9e Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Wed, 22 Feb 2017 22:12:48 -0500 Subject: [PATCH 108/308] WM: Add support for Kwm on macOS --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 0c13f5e2..12953c31 100755 --- a/neofetch +++ b/neofetch @@ -629,7 +629,10 @@ get_wm() { else case "$os" in - "Mac OS X") wm="Quartz Compositor" ;; + "Mac OS X") + wm="Quartz Compositor" + ps -e | grep -q "[k]wm" && wm="Kwm" + ;; "Windows") wm="$(tasklist | grep -m 1 -o -F -e "bugn" -e "Windawesome" -e "blackbox" -e "emerge" -e "litestep")" [[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)" From ceadf7d5fa52aad9290e6a8ef5d6fe679dbca3f1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 23 Feb 2017 14:24:30 +1100 Subject: [PATCH 109/308] WM: Fix indent --- neofetch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 12953c31..b6799e6c 100755 --- a/neofetch +++ b/neofetch @@ -630,9 +630,10 @@ get_wm() { else case "$os" in "Mac OS X") - wm="Quartz Compositor" - ps -e | grep -q "[k]wm" && wm="Kwm" + wm="Quartz Compositor" + ps -e | grep -q "[k]wm" && wm="Kwm" ;; + "Windows") wm="$(tasklist | grep -m 1 -o -F -e "bugn" -e "Windawesome" -e "blackbox" -e "emerge" -e "litestep")" [[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)" From 51fa1b3c12842780a42967b8c7f0fb1873afc307 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 24 Feb 2017 10:18:37 +1100 Subject: [PATCH 110/308] Bar: Semi-fix the color issues when barinfo is used --- neofetch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/neofetch b/neofetch index b6799e6c..d47d1ff9 100755 --- a/neofetch +++ b/neofetch @@ -1043,7 +1043,7 @@ get_cpu_usage() { case "$cpu_display" in "bar") cpu_usage="$(bar "$cpu_usage" 100)" ;; "infobar") cpu_usage="${cpu_usage}% $(bar "$cpu_usage" 100)" ;; - "barinfo") cpu_usage="$(bar "$cpu_usage" 100) ${cpu_usage}%" ;; + "barinfo") cpu_usage="$(bar "$cpu_usage" 100)${info_color} ${cpu_usage}%" ;; *) cpu_usage="${cpu_usage}%" ;; esac } @@ -1267,7 +1267,7 @@ get_memory() { case "$memory_display" in "bar") memory="$(bar "${mem_used}" "${mem_total}")" ;; "infobar") memory="${memory} $(bar "${mem_used}" "${mem_total}")" ;; - "barinfo") memory="$(bar "${mem_used}" "${mem_total}") ${memory}" ;; + "barinfo") memory="$(bar "${mem_used}" "${mem_total}")${info_color} ${memory}" ;; esac } @@ -1763,7 +1763,7 @@ get_disk() { case "$disk_display" in "bar") disk="$(bar "$disk_perc" "100")" ;; "infobar") disk+=" $(bar "$disk_perc" "100")" ;; - "barinfo") disk="$(bar "$disk_perc" "100") $disk" ;; + "barinfo") disk="$(bar "$disk_perc" "100")${info_color} $disk" ;; "perc") disk="${disk_perc}% $(bar "$disk_perc" "100")" ;; esac @@ -1795,7 +1795,7 @@ get_battery() { case "$battery_display" in "bar") battery="$(bar "$capacity" 100)" ;; "infobar") battery+=" $(bar "$capacity" 100)" ;; - "barinfo") battery="$(bar "$capacity" 100) ${battery}" ;; + "barinfo") battery="$(bar "$capacity" 100)${info_color} ${battery}" ;; esac prin "${subtitle:+${subtitle}${bat: -1}}" "$battery" @@ -1852,7 +1852,7 @@ get_battery() { case "$battery_display" in "bar") battery="$(bar "${battery/'%'*}" 100)" ;; "infobar") battery="${battery} $(bar "${battery/'%'*}" 100)" ;; - "barinfo") battery="$(bar "${battery/'%'*}" 100) ${battery}" ;; + "barinfo") battery="$(bar "${battery/'%'*}" 100)${info_color} ${battery}" ;; esac } @@ -3326,8 +3326,8 @@ set_text_colors() { fi case "$bar_color_total $1" in - "distro "[736]) bar_color_total="$c2" ;; - "distro "[0-9]) bar_color_total="$c1" ;; + "distro "[736]) bar_color_total="$(color "$1")" ;; + "distro "[0-9]) bar_color_total="$(color "$2")" ;; *) bar_color_total="$(color "$bar_color_total")" ;; esac } @@ -3448,9 +3448,9 @@ bar() { # Borders. [[ "$bar_border" == "on" ]] && \ - bar="$(color fg)[${bar}$(color fg)]" + bar="${reset}[${bar}${reset}]" - printf "%b\n" "${bar}${info_color}" + printf "%b" "${bar}${info_color}" } cache() { From 716e50ecbfa4c495ca981da7f968cde9144bc40b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 25 Feb 2017 19:02:49 +1100 Subject: [PATCH 111/308] Bar: Fix incorrect coloring. Closes #661 --- neofetch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index d47d1ff9..4744710a 100755 --- a/neofetch +++ b/neofetch @@ -3335,7 +3335,7 @@ set_text_colors() { color() { case "$1" in [0-6]) printf "%b" "${reset}\033[3${1}m" ;; - 7 | "fg") printf "%b" "$reset" ;; + 7 | "fg") printf "%b" "\033[37m${reset}" ;; *) printf "%b" "\033[38;5;${1}m" ;; esac } @@ -3443,12 +3443,12 @@ bar() { printf -v total "%$((bar_length - elapsed))s" # Set the colors and swap the spaces for $bar_char_. - bar+="${bar_color_elapsed}${prog// /$bar_char_elapsed}" - bar+="${bar_color_total}${total// /$bar_char_total}" + bar+="${bar_color_elapsed}${prog// /${bar_char_elapsed}}" + bar+="${bar_color_total}${total// /${bar_char_total}}" # Borders. [[ "$bar_border" == "on" ]] && \ - bar="${reset}[${bar}${reset}]" + bar="$(color fg)[${bar}$(color fg)]" printf "%b" "${bar}${info_color}" } From 39986f2197a51f42aed80f8df6c257653f5b1225 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 28 Feb 2017 11:58:07 +0700 Subject: [PATCH 112/308] Local IP: Fixed UID showing instead of IP --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 4744710a..2d649d88 100755 --- a/neofetch +++ b/neofetch @@ -1859,7 +1859,8 @@ get_battery() { get_local_ip() { case "$os" in "Linux" | "BSD" | "Solaris" | "AIX") - local_ip="$(ip route get 1 | awk '{print $NF;exit}')" + 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 1af650eaf19be7faf781609fd62fddc5d2364e06 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 28 Feb 2017 22:47:40 +0700 Subject: [PATCH 113/308] Docs: CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c90eb4c..34d14a3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,3 +26,7 @@ **Song**
- Fixed Audacious song output when `dbus-send` fails. **[@mstraube](https://github.com/mstraube)** + +**Local IP**
+ +- [Linux] Fixed UID showing instead of Local IP on several versions/configs of iproute2. From 982f2b59ec40f8a6747317b9ab97ae2bb9221fd4 Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Tue, 28 Feb 2017 11:36:57 -0500 Subject: [PATCH 114/308] WM: Add support for Spectacle on macOS --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 2d649d88..632e1f5d 100755 --- a/neofetch +++ b/neofetch @@ -631,6 +631,7 @@ get_wm() { case "$os" in "Mac OS X") wm="Quartz Compositor" + ps -x | grep -q '[S]pectacle' && wm='Spectacle' ps -e | grep -q "[k]wm" && wm="Kwm" ;; From 072ad5cfff5d12cc47970927198ea059a793d37f Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Tue, 28 Feb 2017 11:50:23 -0500 Subject: [PATCH 115/308] Fix ps line --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 632e1f5d..9d39edc0 100755 --- a/neofetch +++ b/neofetch @@ -631,7 +631,7 @@ get_wm() { case "$os" in "Mac OS X") wm="Quartz Compositor" - ps -x | grep -q '[S]pectacle' && wm='Spectacle' + ps -e | grep -q '[S]pectacle' && wm='Spectacle' ps -e | grep -q "[k]wm" && wm="Kwm" ;; From e9c8e6c2a37be1a932c375d4165a5059cfa6e8c8 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Thu, 2 Mar 2017 01:45:46 +0100 Subject: [PATCH 116/308] Add font detection for iTerm2 --- neofetch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/neofetch b/neofetch index 2d649d88..c725aa78 100755 --- a/neofetch +++ b/neofetch @@ -1644,6 +1644,25 @@ get_term_font() { term_font="$(osascript -e 'tell application "Terminal" to font name of window frontmost')" ;; + "iTerm2") + local currentProfileName=$(osascript -e 'tell application "iTerm2" to profile name of current session of current window') + + # Count Guids in "New Bookmarks"; they should be unique + local profilesCount=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist | grep "Guid" | wc -l) + for idx in $(seq 0 ${profilesCount}); do + local profileName=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist) + if [[ "${profileName}" == "${currentProfileName}" ]]; then + # "Normal Font" + term_font=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) + # Font for non-ascii characters + local nonAsciiFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) + if [[ "$term_font" -ne "$nonAsciiFont" ]]; then + term_font="$term_font (normal) / $nonAsciiFont (non-ascii)" + fi + fi + done + ;; + "deepin-terminal"*) term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")" ;; From 4387233378c312648d00d09c0e5bb1c7a114cef8 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Thu, 2 Mar 2017 01:46:22 +0100 Subject: [PATCH 117/308] Add warning that false positives can occur --- neofetch | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neofetch b/neofetch index c725aa78..2d75b0da 100755 --- a/neofetch +++ b/neofetch @@ -1655,6 +1655,12 @@ get_term_font() { # "Normal Font" term_font=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) # Font for non-ascii characters + # This font setting may differ from normal font, but this might be a false + # positive, as there is a setting to use a different font for non-ascii + # characters and this setting does not get updated when flipping the switch. + # So it might be that the user checked the mark to use a different font, + # selected one, but then decided to uncheck the "use different font" mark + # again. local nonAsciiFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) if [[ "$term_font" -ne "$nonAsciiFont" ]]; then term_font="$term_font (normal) / $nonAsciiFont (non-ascii)" From eec7f08eee961462e5c0fa7b2582a57b991cd1c5 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Thu, 2 Mar 2017 01:50:17 +0100 Subject: [PATCH 118/308] Add warning about possible profile name collisions --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index 2d75b0da..9d54041e 100755 --- a/neofetch +++ b/neofetch @@ -1645,6 +1645,10 @@ get_term_font() { ;; "iTerm2") + # Unfortunately the profile name is not unique, but it seems to be the only thing + # that identifies an active profile. There is the "id of current session of current window" + # thou, but that does not match to a guid in the plist. + # So, be warned! Collisions may occur! local currentProfileName=$(osascript -e 'tell application "iTerm2" to profile name of current session of current window') # Count Guids in "New Bookmarks"; they should be unique From e2d1cb27a518cb52770479d3675c198822e49d6e Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Thu, 2 Mar 2017 01:56:29 +0100 Subject: [PATCH 119/308] Fix comparison --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 9d54041e..10bf0373 100755 --- a/neofetch +++ b/neofetch @@ -1666,7 +1666,7 @@ get_term_font() { # selected one, but then decided to uncheck the "use different font" mark # again. local nonAsciiFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) - if [[ "$term_font" -ne "$nonAsciiFont" ]]; then + if [[ "$term_font" != "$nonAsciiFont" ]]; then term_font="$term_font (normal) / $nonAsciiFont (non-ascii)" fi fi From 3cf7c5ffa27222a51464881a056cf1b55a14eb86 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Thu, 2 Mar 2017 02:17:36 +0100 Subject: [PATCH 120/308] Only print non-ascii font if switch "use different font" is active --- neofetch | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/neofetch b/neofetch index 10bf0373..41dc8add 100755 --- a/neofetch +++ b/neofetch @@ -1659,15 +1659,14 @@ get_term_font() { # "Normal Font" term_font=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) # Font for non-ascii characters - # This font setting may differ from normal font, but this might be a false - # positive, as there is a setting to use a different font for non-ascii - # characters and this setting does not get updated when flipping the switch. - # So it might be that the user checked the mark to use a different font, - # selected one, but then decided to uncheck the "use different font" mark - # again. - local nonAsciiFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) - if [[ "$term_font" != "$nonAsciiFont" ]]; then - term_font="$term_font (normal) / $nonAsciiFont (non-ascii)" + # Only check for a different non-ascii font, if the user checked + # the "use a different font for non-ascii text" switch. + local useDifferentFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) + if [[ "$useDifferentFont" == "true" ]]; then + local nonAsciiFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) + if [[ "$term_font" != "$nonAsciiFont" ]]; then + term_font="$term_font (normal) / $nonAsciiFont (non-ascii)" + fi fi fi done From d1e81f3344a6b1f04a26dfd6e5d0b8575695ed84 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Thu, 2 Mar 2017 02:28:23 +0100 Subject: [PATCH 121/308] Add reference to post on iTerm2 list because of ambiguous active profile name --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 41dc8add..d6375e9c 100755 --- a/neofetch +++ b/neofetch @@ -1649,6 +1649,7 @@ get_term_font() { # that identifies an active profile. There is the "id of current session of current window" # thou, but that does not match to a guid in the plist. # So, be warned! Collisions may occur! + # See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg local currentProfileName=$(osascript -e 'tell application "iTerm2" to profile name of current session of current window') # Count Guids in "New Bookmarks"; they should be unique From 38641c690e101e13b2bc4d2bc50b02f10cb60421 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Thu, 2 Mar 2017 02:30:53 +0100 Subject: [PATCH 122/308] Add warning about iTerm2s dynamic profiles --- neofetch | 3 +++ 1 file changed, 3 insertions(+) diff --git a/neofetch b/neofetch index d6375e9c..f5162593 100755 --- a/neofetch +++ b/neofetch @@ -1652,6 +1652,9 @@ get_term_font() { # See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg local currentProfileName=$(osascript -e 'tell application "iTerm2" to profile name of current session of current window') + # Warning: Dynamic profiles are not taken into account here! + # https://www.iterm2.com/documentation-dynamic-profiles.html + # Count Guids in "New Bookmarks"; they should be unique local profilesCount=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist | grep "Guid" | wc -l) for idx in $(seq 0 ${profilesCount}); do From e8bdd31b468bce617bef49a4bb733a0d3312637c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 2 Mar 2017 12:42:06 +1100 Subject: [PATCH 123/308] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34d14a3b..835a181c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ **Window Manager**
- [MacOS] Added support for Kwm. **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- [MacOS] Added support for Spectacle. **[@jorgegonzalez](https://github.com/jorgegonzalez)** **Song**
From 24283be05d8df6b8b9efea8c3ab81f12b2d18724 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Thu, 2 Mar 2017 18:35:13 +0100 Subject: [PATCH 124/308] Mute error message, when PlistBuddy is not installed PlistBuddy is part of XCode. It may be that users don't have it installed. --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index f5162593..c8b23e26 100755 --- a/neofetch +++ b/neofetch @@ -1656,9 +1656,9 @@ get_term_font() { # https://www.iterm2.com/documentation-dynamic-profiles.html # Count Guids in "New Bookmarks"; they should be unique - local profilesCount=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist | grep "Guid" | wc -l) + local profilesCount=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null | grep "Guid" | wc -l) for idx in $(seq 0 ${profilesCount}); do - local profileName=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist) + local profileName=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null) if [[ "${profileName}" == "${currentProfileName}" ]]; then # "Normal Font" term_font=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) From 569bef567fe4f2d17c34f2f9fd36d7490b772e0e Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Fri, 3 Mar 2017 00:04:19 +0100 Subject: [PATCH 125/308] Fix code style --- neofetch | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index c8b23e26..dd087428 100755 --- a/neofetch +++ b/neofetch @@ -1650,24 +1650,29 @@ get_term_font() { # thou, but that does not match to a guid in the plist. # So, be warned! Collisions may occur! # See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg - local currentProfileName=$(osascript -e 'tell application "iTerm2" to profile name of current session of current window') + local currentProfileName + currentProfileName=$(osascript -e 'tell application "iTerm2" to profile name of current session of current window') # Warning: Dynamic profiles are not taken into account here! # https://www.iterm2.com/documentation-dynamic-profiles.html # Count Guids in "New Bookmarks"; they should be unique - local profilesCount=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null | grep "Guid" | wc -l) - for idx in $(seq 0 ${profilesCount}); do - local profileName=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null) + local profilesCount + profilesCount=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null | grep -c "Guid") + for idx in $(seq 0 "${profilesCount}"); do + local profileName + profileName=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null) if [[ "${profileName}" == "${currentProfileName}" ]]; then # "Normal Font" term_font=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) # Font for non-ascii characters # Only check for a different non-ascii font, if the user checked # the "use a different font for non-ascii text" switch. - local useDifferentFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) + local useDifferentFont + useDifferentFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) if [[ "$useDifferentFont" == "true" ]]; then - local nonAsciiFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) + local nonAsciiFont + nonAsciiFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) if [[ "$term_font" != "$nonAsciiFont" ]]; then term_font="$term_font (normal) / $nonAsciiFont (non-ascii)" fi From 0c038451000e42a93323268a8e233062cea4783c Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 3 Mar 2017 14:43:10 +0700 Subject: [PATCH 126/308] Packages: Used better method for checking packages in eopkg (#669) --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 9d39edc0..8a8aa531 100755 --- a/neofetch +++ b/neofetch @@ -468,7 +468,7 @@ get_packages() { packages="$((packages+=$(ls -d -1 /Programs/*/ | wc -l)))" type -p eopkg >/dev/null && \ - packages="$((packages+=$(eopkg list-installed | wc -l)))" + packages="$((packages+=$(ls -1 /var/lib/eopkg/package | wc -l)))" type -p pkg_info >/dev/null && \ packages="$((packages+=$(pkg_info | wc -l)))" From 98061ca6c0725d6a2b53452592ed3bcfdc3ef8a4 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 3 Mar 2017 14:46:48 +0700 Subject: [PATCH 127/308] Docs: CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 835a181c..8ef26e2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - **[@mstraube](https://github.com/mstraube)** - **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- **[@ikeydoherty](https://github.com/ikeydoherty)** ## Ascii @@ -31,3 +32,6 @@ **Local IP**
- [Linux] Fixed UID showing instead of Local IP on several versions/configs of iproute2. + +**Packages**
+- [eopkg] Used a faster detection method. **[@ikeydoherty](https://github.com/ikeydoherty)** From 707601bbf739943afac75022cc18e981a501aa33 Mon Sep 17 00:00:00 2001 From: Eliezio Oliveira Date: Sat, 4 Mar 2017 20:30:14 -0300 Subject: [PATCH 128/308] MacOS screenresolution: accepts output from stdout and stderr. Closes #662 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 8a8aa531..b63788aa 100755 --- a/neofetch +++ b/neofetch @@ -1391,7 +1391,7 @@ get_resolution() { "Mac OS X") if type -p screenresolution >/dev/null; then - resolution="$(screenresolution get | awk '/Display/ {printf $6 "Hz, "}')" + resolution="$(screenresolution get 2>&1 | awk '/Display/ {printf $6 "Hz, "}')" resolution="${resolution//x??@/ @ }" else From 1a6fe2099c57a7d629702876398bd91feeea47d9 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 5 Mar 2017 09:53:02 +0700 Subject: [PATCH 129/308] Docs: Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ef26e2c..4ed30904 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - **[@mstraube](https://github.com/mstraube)** - **[@jorgegonzalez](https://github.com/jorgegonzalez)** - **[@ikeydoherty](https://github.com/ikeydoherty)** +- **[@eliezio](https://github.com/eliezio)** ## Ascii @@ -35,3 +36,6 @@ **Packages**
- [eopkg] Used a faster detection method. **[@ikeydoherty](https://github.com/ikeydoherty)** + +**Resolution**
+- [macOS] Fixed `screenresolution` not appearing at all on newer versions. **[@eliezio](https://github.com/eliezio)** From 53eafeb4145d1312742ec550e9a701fd7d451502 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Wed, 8 Mar 2017 23:19:03 +0100 Subject: [PATCH 130/308] Fix code style --- neofetch | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/neofetch b/neofetch index dd087428..20c88ac9 100755 --- a/neofetch +++ b/neofetch @@ -1650,32 +1650,31 @@ get_term_font() { # thou, but that does not match to a guid in the plist. # So, be warned! Collisions may occur! # See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg - local currentProfileName - currentProfileName=$(osascript -e 'tell application "iTerm2" to profile name of current session of current window') + local current_profile_name + current_profile_name="$(osascript -e 'tell application "iTerm2" to profile name of current session of current window')" # Warning: Dynamic profiles are not taken into account here! # https://www.iterm2.com/documentation-dynamic-profiles.html # Count Guids in "New Bookmarks"; they should be unique - local profilesCount - profilesCount=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null | grep -c "Guid") - for idx in $(seq 0 "${profilesCount}"); do - local profileName - profileName=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null) - if [[ "${profileName}" == "${currentProfileName}" ]]; then + local profiles_count + profiles_count="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null | grep -c "Guid")" + for ((i=0; i<=profiles_count; i++)); do + local profile_name + profile_name="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null)" + if [[ "$profile_name" == "$current_profile_name" ]]; then # "Normal Font" - term_font=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) + term_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)" # Font for non-ascii characters # Only check for a different non-ascii font, if the user checked # the "use a different font for non-ascii text" switch. - local useDifferentFont - useDifferentFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) - if [[ "$useDifferentFont" == "true" ]]; then - local nonAsciiFont - nonAsciiFont=$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${idx}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist) - if [[ "$term_font" != "$nonAsciiFont" ]]; then - term_font="$term_font (normal) / $nonAsciiFont (non-ascii)" - fi + local use_different_font + use_different_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)" + if [[ "$use_different_font" == "true" ]]; then + local non_ascii_font + non_ascii_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)" + [[ "$term_font" != "$non_ascii_font" ]] && \ + term_font="$term_font (normal) / $non_ascii_font (non-ascii)" fi fi done From 8c783d63a2e195cf9674a405248bb899ab8308e1 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Thu, 9 Mar 2017 01:13:31 +0100 Subject: [PATCH 131/308] Add newlines --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index 20c88ac9..c2f7b908 100755 --- a/neofetch +++ b/neofetch @@ -1659,9 +1659,11 @@ get_term_font() { # Count Guids in "New Bookmarks"; they should be unique local profiles_count profiles_count="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null | grep -c "Guid")" + for ((i=0; i<=profiles_count; i++)); do local profile_name profile_name="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null)" + if [[ "$profile_name" == "$current_profile_name" ]]; then # "Normal Font" term_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)" @@ -1670,11 +1672,13 @@ get_term_font() { # the "use a different font for non-ascii text" switch. local use_different_font use_different_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)" + if [[ "$use_different_font" == "true" ]]; then local non_ascii_font non_ascii_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)" [[ "$term_font" != "$non_ascii_font" ]] && \ term_font="$term_font (normal) / $non_ascii_font (non-ascii)" + fi fi done From 8d250e41bac80c923851cda7edd9ecb7f526d676 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Thu, 9 Mar 2017 01:17:31 +0100 Subject: [PATCH 132/308] Fix newlines --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index c2f7b908..67bd6ed7 100755 --- a/neofetch +++ b/neofetch @@ -1676,9 +1676,9 @@ get_term_font() { if [[ "$use_different_font" == "true" ]]; then local non_ascii_font non_ascii_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)" + [[ "$term_font" != "$non_ascii_font" ]] && \ term_font="$term_font (normal) / $non_ascii_font (non-ascii)" - fi fi done From d8561cceed7b4cd47da2e94db6d9ea39a74ef1cb Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 9 Mar 2017 11:47:52 +1100 Subject: [PATCH 133/308] CPU: Show an additional digit in cpu speed --- neofetch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index b63788aa..16126600 100755 --- a/neofetch +++ b/neofetch @@ -810,11 +810,11 @@ get_cpu() { speed="$(< "${speed_dir}/bios_limit")" || \ speed="$(< "${speed_dir}/scaling_max_freq")" || \ speed="$(< "${speed_dir}/cpuinfo_max_freq")" - speed="$((speed / 100000))" + speed="$((speed / 10000))" else speed="$(awk -F ': |\\.' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo)" - speed="$((speed / 100))" + speed="$((speed / 10))" fi # Get CPU temp. @@ -882,7 +882,7 @@ get_cpu() { # Get CPU speed. speed="$(sysctl -n hw.cpuspeed)" [[ -z "$speed" ]] && speed="$(sysctl -n hw.clockrate)" - speed="$((speed / 100))" + speed="$((speed / 10))" # Get CPU cores. cores="$(sysctl -n hw.ncpu)" @@ -920,7 +920,7 @@ get_cpu() { # Get CPU speed. speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')" - speed="$((speed / 100))" + speed="$((speed / 10))" # Get CPU cores. case "$cpu_cores" in @@ -937,7 +937,7 @@ get_cpu() { # Get CPU speed. speed="$(sysinfo -cpu | awk '/running at/ {print $NF; exit}')" speed="${speed/MHz}" - speed="$((speed / 100))" + speed="$((speed / 10))" # Get CPU cores. cores="$(sysinfo -cpu | grep -c -F 'CPU #')" @@ -950,7 +950,7 @@ get_cpu() { # Get CPU speed. speed="$(prtconf | awk -F':' '/Processor Clock Speed/ {printf $2}')" speed="${speed/MHz}" - speed="$((speed / 100))" + speed="$((speed / 10))" # Get CPU cores. case "$cpu_cores" in From 30a6d8641b42192d11317a43cb7f6d959c160c6a Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 9 Mar 2017 12:03:17 +1100 Subject: [PATCH 134/308] CPU: Added speed_shorthand to toggle showing decimals in the output --- config/config | 11 +++++++++++ neofetch | 15 ++++++++------- neofetch.1 | 7 +++++-- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/config/config b/config/config index 2a57fe3f..d1621962 100644 --- a/config/config +++ b/config/config @@ -138,6 +138,17 @@ shell_version="on" # NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value. speed_type="bios_limit" +# CPU speed shorthand +# +# Default: 'off' +# Values: 'on', 'off'. +# Flag: --speed_shorthand. +# +# Example: +# on: 'i7-6500U (4) @ 3.1GHz' +# off: 'i7-6500U (4) @ 3.100GHz' +speed_shorthand="off" + # Shorten the output of the CPU function # # Default: 'off' diff --git a/neofetch b/neofetch index 16126600..6a045651 100755 --- a/neofetch +++ b/neofetch @@ -810,11 +810,10 @@ get_cpu() { speed="$(< "${speed_dir}/bios_limit")" || \ speed="$(< "${speed_dir}/scaling_max_freq")" || \ speed="$(< "${speed_dir}/cpuinfo_max_freq")" - speed="$((speed / 10000))" + speed="$((speed / 1000))" else speed="$(awk -F ': |\\.' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo)" - speed="$((speed / 10))" fi # Get CPU temp. @@ -882,7 +881,6 @@ get_cpu() { # Get CPU speed. speed="$(sysctl -n hw.cpuspeed)" [[ -z "$speed" ]] && speed="$(sysctl -n hw.clockrate)" - speed="$((speed / 10))" # Get CPU cores. cores="$(sysctl -n hw.ncpu)" @@ -920,7 +918,6 @@ get_cpu() { # Get CPU speed. speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')" - speed="$((speed / 10))" # Get CPU cores. case "$cpu_cores" in @@ -937,7 +934,6 @@ get_cpu() { # Get CPU speed. speed="$(sysinfo -cpu | awk '/running at/ {print $NF; exit}')" speed="${speed/MHz}" - speed="$((speed / 10))" # Get CPU cores. cores="$(sysinfo -cpu | grep -c -F 'CPU #')" @@ -950,7 +946,6 @@ get_cpu() { # Get CPU speed. speed="$(prtconf | awk -F':' '/Processor Clock Speed/ {printf $2}')" speed="${speed/MHz}" - speed="$((speed / 10))" # Get CPU cores. case "$cpu_cores" in @@ -960,8 +955,12 @@ get_cpu() { ;; esac - # Fix for speeds under 1ghz. if [[ "$speed" ]]; then + # Hide decimals if on. + [[ "$speed_shorthand" == "on" ]] && \ + speed="$((speed / 100))" + + # Fix for speeds under 1ghz. if [[ -z "${speed:1}" ]]; then speed="0.${speed}" else @@ -3739,6 +3738,7 @@ INFO: NOTE: This only supports Linux with cpufreq. + --speed_shorthand on/off Whether or not to show decimals in CPU speed. --cpu_shorthand type Shorten the output of CPU Possible values: name, speed, tiny, on, off --cpu_cores type Whether or not to display the number of CPU cores @@ -3944,6 +3944,7 @@ get_args() { "--cpu_cores") cpu_cores="$2" ;; "--cpu_speed") cpu_speed="$2" ;; "--speed_type") speed_type="$2" ;; + "--speed_shorthand") speed_shorthand="$2" ;; "--distro_shorthand") distro_shorthand="$2" ;; "--kernel_shorthand") kernel_shorthand="$2" ;; "--uptime_shorthand") uptime_shorthand="$2" ;; diff --git a/neofetch.1 b/neofetch.1 index a51742df..245cbbb7 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" "February 2017" "Neofetch 3.0.2" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.1. +.TH NEOFETCH "1" "March 2017" "Neofetch 3.0.2" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS @@ -30,6 +30,9 @@ scaling_current, scaling_min, scaling_max .IP NOTE: This only supports Linux with cpufreq. .TP +\fB\-\-speed_shorthand\fR on/off +Whether or not to show decimals in CPU speed. +.TP \fB\-\-cpu_shorthand\fR type Shorten the output of CPU Possible values: name, speed, tiny, on, off From ac7cf27147863ed7fdeacd4e7165512eba8c725d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 9 Mar 2017 12:07:29 +1100 Subject: [PATCH 135/308] Resolution: Show decimals --- neofetch | 1 - 1 file changed, 1 deletion(-) diff --git a/neofetch b/neofetch index b63788aa..8f24e1d0 100755 --- a/neofetch +++ b/neofetch @@ -1382,7 +1382,6 @@ get_resolution() { "off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;; esac resolution="${resolution//\*}" - resolution="${resolution//\.[0-9][0-9]}" elif type -p xdpyinfo >/dev/null; then resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')" From 9b0c8fff2cb5effc620adab088f89ca9fe23c80e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 9 Mar 2017 12:07:58 +1100 Subject: [PATCH 136/308] Docs: Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ed30904..65667d3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,3 +39,4 @@ **Resolution**
- [macOS] Fixed `screenresolution` not appearing at all on newer versions. **[@eliezio](https://github.com/eliezio)** +- [Linux] Show decimals. From 7bf8f1785437c61327761e4a380627cba77c8722 Mon Sep 17 00:00:00 2001 From: Niles Rogoff Date: Thu, 9 Mar 2017 10:55:06 -0800 Subject: [PATCH 137/308] Slitaz support added --- ascii/distro/slitaz | 17 +++++++++++++++++ neofetch | 11 +++++++++++ 2 files changed, 28 insertions(+) create mode 100644 ascii/distro/slitaz diff --git a/ascii/distro/slitaz b/ascii/distro/slitaz new file mode 100644 index 00000000..5ee52706 --- /dev/null +++ b/ascii/distro/slitaz @@ -0,0 +1,17 @@ +${c1} @ @( @ + @@ @@ @ @/ + @@ @@ @@ @@ + @@ %@@ @@ @@ + @@ %@@@ @@@@@. @@@@ @@ + @@@ @@@@ @@@@@@@ &@@@ @@@ + @@@@@@@ %@@@@@@@@@@@@ &@@@% @@@@@@@/ + ,@@@@@@@@@@@@@@@@@@@@@@@@@ + .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/ +@@@@@@. @@@@@@@@@@@@@@@@@@@@@ /@@@@@@ +@@ @@@@@ @@@@@@@@@@@@, @@@@@ @@@ +@@ @@@@. @@@@@@@@@@@@@% #@@@@ @@. +@@ ,@@ @@@@@@@@@@@@@ @@@ @@ +@ @@. @@@@@@@@@@@@@ @@@ *@ +@ @@ @@@@@@@@@@@@ @@ @ + @ @@@@@@@@@. #@ + @ ,@@@@@ @ diff --git a/neofetch b/neofetch index 8f24e1d0..0fc48840 100755 --- a/neofetch +++ b/neofetch @@ -93,6 +93,9 @@ get_distro() { "tiny") distro="${distro//version*}" ;; esac + elif type -p tazpkg >/dev/null; then + distro="SliTaz $(cat /etc/slitaz-release)" + elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then distro="Android $(getprop ro.build.version.release)" @@ -476,6 +479,9 @@ get_packages() { type -p crew >/dev/null && \ packages="$((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)))" + type -p tazpkg >/dev/null && \ + packages="$(($(tazpkg list|wc -l)-6))" + if type -p pkg >/dev/null; then case "$kernel_name" in "FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;; @@ -3150,6 +3156,11 @@ get_distro_colors() { ascii_file="slackware" ;; + "SliTaz"*) + set_colors 3 3 + ascii_file="slitaz" + ;; + "SmartOS"*) set_colors 6 7 ascii_file="smartos" From ce7ef1937254fbf7518a5af87c98f8fc02ce60a3 Mon Sep 17 00:00:00 2001 From: Niles Rogoff Date: Thu, 9 Mar 2017 13:27:16 -0800 Subject: [PATCH 138/308] Correct style --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 0fc48840..79ab5041 100755 --- a/neofetch +++ b/neofetch @@ -94,7 +94,7 @@ get_distro() { esac elif type -p tazpkg >/dev/null; then - distro="SliTaz $(cat /etc/slitaz-release)" + distro="SliTaz $(< /etc/slitaz-release)" elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then distro="Android $(getprop ro.build.version.release)" @@ -480,7 +480,7 @@ get_packages() { packages="$((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)))" type -p tazpkg >/dev/null && \ - packages="$(($(tazpkg list|wc -l)-6))" + packages="$((packages+=$(tazpkg list | wc -l) - 6))" if type -p pkg >/dev/null; then case "$kernel_name" in From fd3d2fc29bba2ab05a861d4ccfa0d79622f7390f Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 10 Mar 2017 10:43:21 +0700 Subject: [PATCH 139/308] Docs: Changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65667d3a..122510eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ - **[@jorgegonzalez](https://github.com/jorgegonzalez)** - **[@ikeydoherty](https://github.com/ikeydoherty)** - **[@eliezio](https://github.com/eliezio)** +- **[@nilesr](https://github.com/nilesr)** + +## Operating System + +- Added support for SliTaz. **[@nilesr](https://github.com/nilesr)** ## Ascii From 91a7bd4737757ac09a317242e80a5baaa5a242e7 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 15 Mar 2017 21:27:16 +1100 Subject: [PATCH 140/308] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 122510eb..795ebff5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ - **[@ikeydoherty](https://github.com/ikeydoherty)** - **[@eliezio](https://github.com/eliezio)** - **[@nilesr](https://github.com/nilesr)** +- **[@dritter](https://github.com/dritter)** + ## Operating System @@ -26,6 +28,10 @@ ## Info +**Terminal Font**
+ +- Added \*experimental\* font detection for iTerm2. **[@dritter](https://github.com/dritter)** + **Window Manager**
- [MacOS] Added support for Kwm. **[@jorgegonzalez](https://github.com/jorgegonzalez)** From 1bd185874c3afde2f485ec51850da3a5f32e06ef Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Tue, 21 Mar 2017 13:45:23 -0400 Subject: [PATCH 141/308] WM: Add support for Amethyst on macOS --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 9b5a23d9..60f6c7b2 100755 --- a/neofetch +++ b/neofetch @@ -638,6 +638,7 @@ get_wm() { "Mac OS X") wm="Quartz Compositor" ps -e | grep -q '[S]pectacle' && wm='Spectacle' + ps -e | grep -q "[A]methyst" && wm="Amethyst" ps -e | grep -q "[k]wm" && wm="Kwm" ;; From 0c4d4eb23aeb6168410d8a2134bb626c43613ede Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Tue, 21 Mar 2017 18:37:41 -0400 Subject: [PATCH 142/308] Reduce macOS WM detections to one ps call --- neofetch | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index 60f6c7b2..79c9e71c 100755 --- a/neofetch +++ b/neofetch @@ -636,10 +636,17 @@ get_wm() { else case "$os" in "Mac OS X") - wm="Quartz Compositor" - ps -e | grep -q '[S]pectacle' && wm='Spectacle' - ps -e | grep -q "[A]methyst" && wm="Amethyst" - ps -e | grep -q "[k]wm" && wm="Kwm" + ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')" + + if echo "$ps_line" | grep -q "kwm"; then + wm="Kwm" + elif echo "$ps_line" | grep -q "Amethyst"; then + wm="Amethyst" + elif echo "$ps_line" | grep -q "Spectacle"; then + wm="Spectacle" + else + wm="Quartz Compositor" + fi ;; "Windows") From 6803b571b7ffaed77b3153133d36e883e0d9177b Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Tue, 21 Mar 2017 19:58:47 -0400 Subject: [PATCH 143/308] Change if statement to a switch --- neofetch | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/neofetch b/neofetch index 79c9e71c..0431b52f 100755 --- a/neofetch +++ b/neofetch @@ -638,15 +638,12 @@ get_wm() { "Mac OS X") ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')" - if echo "$ps_line" | grep -q "kwm"; then - wm="Kwm" - elif echo "$ps_line" | grep -q "Amethyst"; then - wm="Amethyst" - elif echo "$ps_line" | grep -q "Spectacle"; then - wm="Spectacle" - else - wm="Quartz Compositor" - fi + case "$ps_line" in + *"kwm"*) wm="Kwm" ;; + *"Amethyst"*) wm="Amethyst" ;; + *"Spectacle"*) wm="Spectacle" ;; + *) wm="Quartz Compositor" ;; + esac ;; "Windows") From bfcab94391bc63bb3fb19f6b397115556f075eee Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 22 Mar 2017 14:29:20 +1100 Subject: [PATCH 144/308] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 795ebff5..6ba2c160 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ - [MacOS] Added support for Kwm. **[@jorgegonzalez](https://github.com/jorgegonzalez)** - [MacOS] Added support for Spectacle. **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- [MacOS] Add support for Amethyst. **[@jorgegonzalez](https://github.com/jorgegonzalez)** **Song**
From adeb59173d2930503e511d0df194433377bbdc8d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 22 Mar 2017 14:29:50 +1100 Subject: [PATCH 145/308] Update CHANGELOG.md --- CHANGELOG.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ba2c160..6d02ca3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,27 +28,27 @@ ## Info -**Terminal Font**
+**Terminal Font** - Added \*experimental\* font detection for iTerm2. **[@dritter](https://github.com/dritter)** -**Window Manager**
+**Window Manager** - [MacOS] Added support for Kwm. **[@jorgegonzalez](https://github.com/jorgegonzalez)** - [MacOS] Added support for Spectacle. **[@jorgegonzalez](https://github.com/jorgegonzalez)** - [MacOS] Add support for Amethyst. **[@jorgegonzalez](https://github.com/jorgegonzalez)** -**Song**
+**Song** - Fixed Audacious song output when `dbus-send` fails. **[@mstraube](https://github.com/mstraube)** -**Local IP**
+**Local IP** - [Linux] Fixed UID showing instead of Local IP on several versions/configs of iproute2. -**Packages**
+**Packages** - [eopkg] Used a faster detection method. **[@ikeydoherty](https://github.com/ikeydoherty)** -**Resolution**
+**Resolution** - [macOS] Fixed `screenresolution` not appearing at all on newer versions. **[@eliezio](https://github.com/eliezio)** - [Linux] Show decimals. From 7f732aef1ef9ae453e663b9d6646bb18da3e238e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 22 Mar 2017 15:18:36 +1100 Subject: [PATCH 146/308] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d02ca3f..2b145932 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,10 @@ ## Info +**CPU** + +- Add option to show decimals in CPU speed. + **Terminal Font** - Added \*experimental\* font detection for iTerm2. **[@dritter](https://github.com/dritter)** From e92a03816e08610a139c40c52ad6beddeb19fde8 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Wed, 22 Mar 2017 11:07:59 +0100 Subject: [PATCH 147/308] OS: Add support for Nitrux --- ascii/distro/nitrux | 18 ++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 ascii/distro/nitrux diff --git a/ascii/distro/nitrux b/ascii/distro/nitrux new file mode 100644 index 00000000..2f49d638 --- /dev/null +++ b/ascii/distro/nitrux @@ -0,0 +1,18 @@ +${c1}`:/. +`/yo +`/yo +`/yo .+:. +`/yo .sys+:.` +`/yo `-/sys+:.` +`/yo ./sss+:.` +`/yo .:oss+:-` +`/yo ./o///:-` +`/yo `.-:///////:` +`/yo `.://///++//-`` +`/yo `.-:////++++/-` +`/yo `-://///++o+/-` +`/yo `-/+o+++ooo+/-` +`/s+:+oooossso/.` +`//+sssssso:. +`+syyyy+:` +:+s+- diff --git a/neofetch b/neofetch index ef4df704..7503934a 100755 --- a/neofetch +++ b/neofetch @@ -3065,6 +3065,11 @@ get_distro_colors() { ascii_file="netrunner" ;; + "Nitrux"*) + set_colors 4 + ascii_file="nitrux" + ;; + "NixOS"*) set_colors 4 6 ascii_file="nixos" From 012e2cbcb14808e10830e9d7397b4fa264d7ba2b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 23 Mar 2017 00:00:40 +1100 Subject: [PATCH 148/308] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b145932..7e9d86ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ## Operating System - Added support for SliTaz. **[@nilesr](https://github.com/nilesr)** +- Add support for Nitrux. **[@mstraube](https://github.com/mstraube)** ## Ascii From e1f2dcac9387e0ea5384d7eff0a11929660aa63b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 23 Mar 2017 00:00:48 +1100 Subject: [PATCH 149/308] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e9d86ea..933df38f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ ## Operating System - Added support for SliTaz. **[@nilesr](https://github.com/nilesr)** -- Add support for Nitrux. **[@mstraube](https://github.com/mstraube)** +- Added support for Nitrux. **[@mstraube](https://github.com/mstraube)** ## Ascii From a575c01b5cba723418cf8733a640751e98bca5a9 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 23 Mar 2017 08:03:43 +1100 Subject: [PATCH 150/308] iTerm2: Fix image mode in tmux, closes #678 --- neofetch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 8f24e1d0..97289078 100755 --- a/neofetch +++ b/neofetch @@ -2416,7 +2416,12 @@ display_image() { ;; "iterm2") - printf "%b\a\n" "\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")" + iterm_cmd="\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")" + + # Tmux requires an additional escape sequence for this to work. + [[ -n "$TMUX" ]] && iterm_cmd="\033Ptmux;\033${iterm_cmd}\033\\" + + printf "%b\a\n" "$iterm_cmd" ;; "tycat") From 464a810f9423f3fe1cc8986f7a0b1a7596d3b8ed Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 23 Mar 2017 08:05:29 +1100 Subject: [PATCH 151/308] Docs: Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 933df38f..b37c217c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - Added `termpix` backend. - Only use a zero width space in the `w3m` backend. - Fixed bug causing terminal size to not be found. +- [iTerm2] Fixed images not appearing inside `tmux`. ## Info From d34f01f21b5f64620c3207b9807c37c987e84dde Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 27 Mar 2017 08:29:04 +1100 Subject: [PATCH 152/308] Scrot: Make scrot easier to use --- config/config | 10 ---------- neofetch | 12 +++++------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/config/config b/config/config index d1621962..0e11e354 100644 --- a/config/config +++ b/config/config @@ -681,16 +681,6 @@ scrot="off" # Flag: --scrot_cmd scrot_cmd="auto" -# Screenshot Directory -# Where to save the screenshots -# -# Default: '~/Pictures/' -# Values: 'dir' -# Flag: --scrot_dir -# -# Note: Neofetch won't create the directory if it doesn't exist. -scrot_dir="$HOME/Pictures/" - # Screenshot Filename # What to name the screenshots # diff --git a/neofetch b/neofetch index a3690aa9..1fd40c24 100755 --- a/neofetch +++ b/neofetch @@ -637,13 +637,13 @@ get_wm() { case "$os" in "Mac OS X") ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')" - + case "$ps_line" in *"kwm"*) wm="Kwm" ;; *"Amethyst"*) wm="Amethyst" ;; *"Spectacle"*) wm="Spectacle" ;; *) wm="Quartz Compositor" ;; - esac + esac ;; "Windows") @@ -2516,11 +2516,7 @@ to_off() { # SCREENSHOT take_scrot() { - if [[ -d "$scrot_dir" ]]; then - scrot_program "${scrot_dir}${scrot_name}" 2>/dev/null - else - printf "%s\n" "Screenshot: $scrot_dir doesn't exist. Edit the config file or create the directory to take screenshots." - fi + scrot_program "${scrot_dir}${scrot_name}" 2>/dev/null [[ "$scrot_upload" == "on" ]] && scrot_upload } @@ -2568,6 +2564,8 @@ scrot_args() { scrot_dir="${2/$scrot_name}" ;; esac + + [[ -z "$@" ]] && scrot_dir="${PWD:+${PWD}/}" } scrot_program() { From 4659863737fba40ab97387d56869a533db8b112d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 27 Mar 2017 08:33:13 +1100 Subject: [PATCH 153/308] Scrot: Unset scrot_dir if the user has set it --- neofetch | 3 +++ 1 file changed, 3 insertions(+) diff --git a/neofetch b/neofetch index 1fd40c24..2f397053 100755 --- a/neofetch +++ b/neofetch @@ -3651,6 +3651,9 @@ old_options() { # Birthday was renamed to Install Date in 3.0 [[ -n "$birthday_time" ]] && { err "Config: \$birthday_time is deprecated, use \3install_time instead."; install_time="$birthday_time"; } + + # Scrot dir was removed in 3.1.0. + [[ -n "$scrot_dir" ]] && scrot_dir= } cache_uname() { From 1e6804f54af382fa0a176444430461d2e3120a4d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 27 Mar 2017 08:45:12 +1100 Subject: [PATCH 154/308] Scrot: Log where the file was saved and fix bug with empty filename --- neofetch | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/neofetch b/neofetch index 2f397053..6a157658 100755 --- a/neofetch +++ b/neofetch @@ -2518,6 +2518,8 @@ to_off() { take_scrot() { scrot_program "${scrot_dir}${scrot_name}" 2>/dev/null + err "Scrot: Saved screenshot as: ${scrot_dir}${scrot_name}" + [[ "$scrot_upload" == "on" ]] && scrot_upload } @@ -2557,15 +2559,16 @@ scrot_upload() { scrot_args() { scrot="on" - case "$2" in - "-"* | "") ;; - *) - scrot_name="${2##*/}" - scrot_dir="${2/$scrot_name}" - ;; - esac - [[ -z "$@" ]] && scrot_dir="${PWD:+${PWD}/}" + if [[ "$2" =~ \.(png|jpg|jpe|jpeg|gif)$ ]]; then + scrot_name="${2##*/}" + scrot_dir="${2/$scrot_name}" + + elif [[ -d "$2" ]]; then + scrot_dir="$2" + else + scrot_dir="${PWD:+${PWD}/}" + fi } scrot_program() { From a6573119f95db044f072adca0a8ff163d03c6f64 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 27 Mar 2017 08:51:56 +1100 Subject: [PATCH 155/308] Info: Added function to display locale --- config/config | 1 + neofetch | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config/config b/config/config index d1621962..92794f63 100644 --- a/config/config +++ b/config/config @@ -37,6 +37,7 @@ print_info() { # info "Public IP" public_ip # info "Users" users # info "Install Date" install_date + # info "Locale" locale info line_break info cols diff --git a/neofetch b/neofetch index a3690aa9..9fab49d8 100755 --- a/neofetch +++ b/neofetch @@ -637,13 +637,13 @@ get_wm() { case "$os" in "Mac OS X") ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')" - + case "$ps_line" in *"kwm"*) wm="Kwm" ;; *"Amethyst"*) wm="Amethyst" ;; *"Spectacle"*) wm="Spectacle" ;; *) wm="Quartz Compositor" ;; - esac + esac ;; "Windows") @@ -1993,6 +1993,10 @@ get_install_date() { install_date="$(convert_time "${install_date[@]}")" } +get_locale() { + locale="$sys_locale" +} + get_cols() { if [[ "$color_blocks" == "on" ]]; then # Convert the width to space chars. From 631ae8d2b475debf8b69de4100fdf27a18a0fd1a Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 27 Mar 2017 09:50:52 +1100 Subject: [PATCH 156/308] GPU: [Linux] Hide duplicate lines --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index a3690aa9..8c6bf261 100755 --- a/neofetch +++ b/neofetch @@ -637,13 +637,13 @@ get_wm() { case "$os" in "Mac OS X") ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')" - + case "$ps_line" in *"kwm"*) wm="Kwm" ;; *"Amethyst"*) wm="Amethyst" ;; *"Spectacle"*) wm="Spectacle" ;; *) wm="Quartz Compositor" ;; - esac + esac ;; "Windows") @@ -1064,7 +1064,7 @@ get_gpu() { "Linux") # Read GPUs into array. IFS=$'\n' - gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}')) + gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '!a[$0]++ && /"Display|"3D|"VGA/ {print $3 " " $4}')) IFS="$old_ifs" # Number the GPUs if more than one exists. From b37916e42afa1454c57611061b930ed4cba7b7ef Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 27 Mar 2017 09:51:34 +1100 Subject: [PATCH 157/308] DOCS: Changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b37c217c..2b12e4a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,8 +53,14 @@ - [Linux] Fixed UID showing instead of Local IP on several versions/configs of iproute2. **Packages** + - [eopkg] Used a faster detection method. **[@ikeydoherty](https://github.com/ikeydoherty)** **Resolution** + - [macOS] Fixed `screenresolution` not appearing at all on newer versions. **[@eliezio](https://github.com/eliezio)** - [Linux] Show decimals. + +**GPU** + +- [Linux] Hide duplicate GPU lines (Only display 1). From f8f26453ae5d87c03bc4f9a5fb727dfb889dda06 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 28 Mar 2017 08:49:46 +1100 Subject: [PATCH 158/308] Ascii: [Arch] Use brighter colors --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 8c6bf261..5d480cef 100755 --- a/neofetch +++ b/neofetch @@ -2801,12 +2801,12 @@ get_distro_colors() { ;; "arch_small") - set_colors 4 7 1 + set_colors 6 7 1 ascii_file="arch_small" ;; "arch_old") - set_colors 4 7 1 + set_colors 6 7 1 ascii_file="arch_old" ;; @@ -2816,7 +2816,7 @@ get_distro_colors() { ;; "Arch"*) - set_colors 4 4 7 1 + set_colors 6 6 7 1 ascii_file="arch" ;; From e562e733879b145fe682c5681a2d6135ae6f988c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 28 Mar 2017 08:50:23 +1100 Subject: [PATCH 159/308] DOCS: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b12e4a6..db80962c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ## Ascii +- Arch ascii art now uses lighter colors. - Update Parabola logo. **[@mstraube](https://github.com/mstraube)** From d742d9aa9c2ef3a2463ca030ee00c03ef8708aa6 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 2 Apr 2017 06:58:48 +1000 Subject: [PATCH 160/308] Disk: Add new option to only show dir name in subtitle --- config/config | 7 ++++++- neofetch | 9 ++++++++- neofetch.1 | 9 ++++++--- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/config/config b/config/config index d1621962..4ffbf027 100644 --- a/config/config +++ b/config/config @@ -328,7 +328,7 @@ disk_show=('/') # What to append to the Disk subtitle. # # Default: 'mount' -# Values: 'mount', 'name' +# Values: 'mount', 'name', 'dir' # Flag: --disk_subtitle # # Example: @@ -337,6 +337,11 @@ disk_show=('/') # # mount: 'Disk (/): 74G / 118G (66%)' # 'Disk (/mnt/Local Disk): 74G / 118G (66%)' +# 'Disk (/mnt/Videos): 74G / 118G (66%)' +# +# dir: 'Disk (/): 74G / 118G (66%)' +# 'Disk (Local Disk): 74G / 118G (66%)' +# 'Disk (Videos): 74G / 118G (66%)' disk_subtitle="mount" diff --git a/neofetch b/neofetch index 5d480cef..2c2238a0 100755 --- a/neofetch +++ b/neofetch @@ -1806,6 +1806,10 @@ get_disk() { # Subtitle. case "$disk_subtitle" in "name") disk_sub="${disk_info[0]}" ;; + "dir") + disk_sub="${disk_info[5]/*\/}" + [[ -z "$disk_sub" ]] && disk_sub="${disk_info[5]}" + ;; *) disk_sub="${disk_info[5]}" ;; esac @@ -3844,12 +3848,15 @@ INFO: NOTE: Multiple values can be given. (--disk_show '/' '/dev/sdc1') - --disk_subtitle name/mount What information to append to the Disk subtitle. + --disk_subtitle type What information to append to the Disk subtitle. + Takes: name, mount, dir 'name' shows the disk's name (sda1, sda2, etc) 'mount' shows the disk's mount point (/, /mnt/Local Disk, etc) + 'dir' shows the basename of the disks's path. (/, Local Disk, etc) + --ip_host url URL to query for public IP --song_shorthand on/off Print the Artist/Title on separate lines --install_time on/off Enable/Disable showing the time in Install Date output. diff --git a/neofetch.1 b/neofetch.1 index 245cbbb7..30fc4e92 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.1. -.TH NEOFETCH "1" "March 2017" "Neofetch 3.0.2" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH NEOFETCH "1" "April 2017" "Neofetch 3.0.2" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS @@ -99,12 +99,15 @@ Possible values: '/', '/dev/sdXX', '/path/to/mount point' .IP NOTE: Multiple values can be given. (\fB\-\-disk_show\fR '/' '/dev/sdc1') .TP -\fB\-\-disk_subtitle\fR name/mount +\fB\-\-disk_subtitle\fR type What information to append to the Disk subtitle. +Takes: name, mount, dir .IP \&'name' shows the disk's name (sda1, sda2, etc) .IP \&'mount' shows the disk's mount point (/, \fI\,/mnt/Local\/\fP Disk, etc) +.IP +\&'dir' shows the basename of the disks's path. (/, Local Disk, etc) .TP \fB\-\-ip_host\fR url URL to query for public IP From e6044b3c41517fdd8db35262ab4c81b017b28848 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 4 Apr 2017 08:47:26 +1000 Subject: [PATCH 161/308] Distro: Add support for DesaOS --- ascii/distro/desaos | 17 +++++++++++++++++ neofetch | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 ascii/distro/desaos diff --git a/ascii/distro/desaos b/ascii/distro/desaos new file mode 100644 index 00000000..2a1b2245 --- /dev/null +++ b/ascii/distro/desaos @@ -0,0 +1,17 @@ +${c1}████████████████████████████ +████████████████████████████ +████████████████████████████ +████████████████████████████ +█████████████ ███████████ +█████████████ ███████████ +█████████████ ███████████ +█████████████ ███████████ +█████████████ ███████████ +█████████████ ███████████ +█████████████ ███████████ +█████████████ ███████████ +█████████████ ███████████ +████████████████████████████ +████████████████████████████ +████████████████████████████ +████████████████████████████ diff --git a/neofetch b/neofetch index 5d480cef..b0347259 100755 --- a/neofetch +++ b/neofetch @@ -2890,6 +2890,11 @@ get_distro_colors() { ascii_file="deepin" ;; + "DesaOS") + set_colors 2 7 + ascii_file="desaos" + ;; + "Devuan"*) set_colors 5 7 ascii_file="devuan" From d23dcbe3bc4f7488220878ffa0afc0a52d291ac4 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 4 Apr 2017 08:47:58 +1000 Subject: [PATCH 162/308] Docs: Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index db80962c..eaf2bbfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Added support for SliTaz. **[@nilesr](https://github.com/nilesr)** - Added support for Nitrux. **[@mstraube](https://github.com/mstraube)** +- Added support for DesaOS. ## Ascii From efa8110d31e038abb4cb1bc44fd934ddebcb1052 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 4 Apr 2017 08:52:11 +1000 Subject: [PATCH 163/308] docs: Changelog --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eaf2bbfd..9422caed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,16 @@ - Added support for DesaOS. +## Screenshot + +The screenshot feature no longer requires any configuration before working. We no longer hardcode `${HOME}/Pictures/neofetch` as the screenshot location. Here's how the `-s` and `-su` flags now function: + +- `neofetch -s` will save a file in the current directory named: `neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png` +- `neofetch -s test.png` will save a file in the current directory called `test.png` +- `neofetch -s ~/` will save a file in `~` called `neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png` +- `neofetch -s ~/test.png` will save a file in `~` called `test.png`. + + ## Ascii - Arch ascii art now uses lighter colors. From ea55959468c29534f62fd96b170f7397daf78261 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 4 Apr 2017 08:54:15 +1000 Subject: [PATCH 164/308] docs: CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9422caed..3528c087 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,10 @@ The screenshot feature no longer requires any configuration before working. We n - [MacOS] Added support for Spectacle. **[@jorgegonzalez](https://github.com/jorgegonzalez)** - [MacOS] Add support for Amethyst. **[@jorgegonzalez](https://github.com/jorgegonzalez)** +**Disk** + +- Added new option to only show dir name in subtitle. + **Song** - Fixed Audacious song output when `dbus-send` fails. **[@mstraube](https://github.com/mstraube)** From 0efc00419ec7965acf24692aeaa4c1c8974442d2 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 5 Apr 2017 15:08:09 +0700 Subject: [PATCH 165/308] OS: Added support for MinGW --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 7e9b492d..dd442009 100755 --- a/neofetch +++ b/neofetch @@ -38,7 +38,7 @@ get_os() { "Linux" | "GNU"*) os="Linux" ;; "Darwin") os="$(sw_vers -productName)" ;; *"BSD" | "DragonFly" | "Bitrig") os="BSD" ;; - "CYGWIN"* | "MSYS"*) os="Windows" ;; + "CYGWIN"* | "MSYS"* | "MINGW"*) os="Windows" ;; "SunOS") os="Solaris" ;; "Haiku") os="Haiku" ;; "MINIX") os="MINIX" ;; @@ -1967,7 +1967,7 @@ get_install_date() { "Windows") case "$kernel_name" in "CYGWIN"*) install_file="/cygdrive/c/Windows/explorer.exe" ;; - "MSYS"*) install_file="/c/Windows/explorer.exe" ;; + "MSYS"* | "MINGW"*) install_file="/c/Windows/explorer.exe" ;; esac ;; "Haiku") install_file="/boot" ;; @@ -2222,7 +2222,7 @@ get_wallpaper() { "Windows XP") case "$kernel_name" in "CYGWIN"*) image="/cygdrive/c/Documents and Settings/${USER}" ;; - "MSYS2"*) image="/c/Documents and Settings/${USER}" ;; + "MSYS2"* | "MINGW*") image="/c/Documents and Settings/${USER}" ;; esac image+="/Local Settings/Application Data/Microsoft" image+="/Wallpaper1.bmp" From 0e50e7d3baca0caa8628f0c1b8f28945032c7295 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 5 Apr 2017 23:21:53 +0700 Subject: [PATCH 166/308] Docs: Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3528c087..b62f8495 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Added support for SliTaz. **[@nilesr](https://github.com/nilesr)** - Added support for Nitrux. **[@mstraube](https://github.com/mstraube)** - Added support for DesaOS. +- Added support for MinGW. ## Screenshot From 0573560cca7a5fb74785ab7f5915b9c7e9165443 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 6 Apr 2017 07:56:51 +1000 Subject: [PATCH 167/308] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5bbb09cf..50f20b4f 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 commandline 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/Windows 10 Linux subsystem)`. +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/MingGW/Windows 10 Linux subsystem)`. For more information: From 6a3845486b95687a30c9bd528baeca8aa2a6e623 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 6 Apr 2017 07:57:15 +1000 Subject: [PATCH 168/308] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50f20b4f..114a0efd 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 commandline 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/MingGW/Windows 10 Linux subsystem)`. +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)`. For more information: From 8deb31b3d63423daed7d1dd20f23ec699ca324a6 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 6 Apr 2017 09:28:11 +1000 Subject: [PATCH 169/308] General: Add warning about glibc to get_locale --- config/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config b/config/config index 92794f63..7c86ae84 100644 --- a/config/config +++ b/config/config @@ -37,7 +37,7 @@ print_info() { # info "Public IP" public_ip # info "Users" users # info "Install Date" install_date - # info "Locale" locale + # info "Locale" locale # This only works on glibc systems. info line_break info cols From 15451a5283f14238eec8548f36edc2dc870248ea Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 6 Apr 2017 09:34:56 +1000 Subject: [PATCH 170/308] Update CHANGELOG.md --- CHANGELOG.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b62f8495..97dd871c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,9 +43,13 @@ The screenshot feature no longer requires any configuration before working. We n ## Info +**Locale** + +- Added a new function to display system locale. (Disabled by default) + **CPU** -- Add option to show decimals in CPU speed. +- Added option to show decimals in CPU speed. **Terminal Font** @@ -55,7 +59,7 @@ The screenshot feature no longer requires any configuration before working. We n - [MacOS] Added support for Kwm. **[@jorgegonzalez](https://github.com/jorgegonzalez)** - [MacOS] Added support for Spectacle. **[@jorgegonzalez](https://github.com/jorgegonzalez)** -- [MacOS] Add support for Amethyst. **[@jorgegonzalez](https://github.com/jorgegonzalez)** +- [MacOS] Added support for Amethyst. **[@jorgegonzalez](https://github.com/jorgegonzalez)** **Disk** @@ -71,7 +75,7 @@ The screenshot feature no longer requires any configuration before working. We n **Packages** -- [eopkg] Used a faster detection method. **[@ikeydoherty](https://github.com/ikeydoherty)** +- [eopkg] Use a faster detection method. **[@ikeydoherty](https://github.com/ikeydoherty)** **Resolution** From 5cca832de5e74d63e95aa1df9838915d3016a952 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 10 Apr 2017 09:18:24 +1000 Subject: [PATCH 171/308] Ascii: Update DesaOS logo --- ascii/distro/desaos | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/ascii/distro/desaos b/ascii/distro/desaos index 2a1b2245..81d8b55e 100644 --- a/ascii/distro/desaos +++ b/ascii/distro/desaos @@ -1,17 +1,16 @@ -${c1}████████████████████████████ -████████████████████████████ -████████████████████████████ -████████████████████████████ -█████████████ ███████████ -█████████████ ███████████ -█████████████ ███████████ -█████████████ ███████████ -█████████████ ███████████ -█████████████ ███████████ -█████████████ ███████████ -█████████████ ███████████ -█████████████ ███████████ -████████████████████████████ -████████████████████████████ -████████████████████████████ -████████████████████████████ +${c1}███████████████████████ +███████████████████████ +███████████████████████ +███████████████████████ +████████ ███████ +████████ ███████ +████████ ███████ +████████ ███████ +████████ ███████ +████████ ███████ +████████ ███████ +██████████████████████████████ +██████████████████████████████ +████████████████████████ +████████████████████████ +████████████████████████ From 990260967992c5d18cee5107bc7f8cfe06010d5f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 10 Apr 2017 10:01:38 +1000 Subject: [PATCH 172/308] General: README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 114a0efd..fd7d6d2e 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.md) [![Latest release](https://img.shields.io/github/release/dylanaraps/neofetch.svg)](https://github.com/dylanaraps/neofetch/releases) -Neofetch is a CLI system information tool written in BASH. Neofetch displays information about your system next to an image, your OS logo, or any ascii file of your choice. The main purpose of Neofetch is to be used in screenshots to show other users what OS/Distro you're running, what Theme/Icons you're using and etc. +Neofetch is a CLI system information tool written in BASH. Neofetch displays information about your system next to an image, your OS logo, or any ASCII file of your choice. The main purpose of Neofetch is to be used in screenshots to show other users what OS/Distro you're running, what Theme/Icons you're using etc. -Neofetch is highly customizable through the use of commandline 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 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)`. @@ -48,7 +48,7 @@ https://github.com/dylanaraps/neofetch/wiki/Customizing-Info ### Customizing the script using a custom alias -If you don't want to use the config file you can customize almost everything using launch flags! +If you don't want to use the config file you can customize almost everything using launch flags. Here's an example neofetch alias: @@ -76,6 +76,6 @@ Thanks to: - Thanks for using Neofetch! - [Screenfetch](https://github.com/KittyKatt/screenFetch): - We've used some snippets as a base for a few functions in this script. - - Some of the ascii logos. + - Some of the ASCII logos. - [ufetch](https://github.com/jschx/ufetch): - - Tiny ascii logos + - Tiny ASCII logos From d8e1150e19c68c82ea4cfd187716f266c6767c0a Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 8 Apr 2017 15:28:39 +0200 Subject: [PATCH 173/308] Battery: Add support for Bay Trail devices (axp288_fuel_gauge) --- neofetch | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/neofetch b/neofetch index 34afac30..d3f35012 100755 --- a/neofetch +++ b/neofetch @@ -1833,26 +1833,24 @@ get_disk() { get_battery() { case "$os" in "Linux") - # We use 'prin' here and exit the function early so that we can - # do multi battery support with a single battery per line. - for bat in "/sys/class/power_supply/BAT"*; do + # We use 'prin' here so that we can do multi battery support + # with a single battery per line. + for bat in "/sys/class/power_supply/"{BAT,axp288_fuel_gauge}*; do capacity="$(< "${bat}/capacity")" status="$(< "${bat}/status")" - # Fix for bash on Windows 10 which includes /proc files - # for battery usage despite there not being a battery - # installed. - [[ -z "$capacity" ]] && return + if [[ "$capacity" ]]; then + battery="${capacity}% [${status}]" - battery="${capacity}% [${status}]" + case "$battery_display" in + "bar") battery="$(bar "$capacity" 100)" ;; + "infobar") battery+=" $(bar "$capacity" 100)" ;; + "barinfo") battery="$(bar "$capacity" 100)${info_color} ${battery}" ;; + esac - case "$battery_display" in - "bar") battery="$(bar "$capacity" 100)" ;; - "infobar") battery+=" $(bar "$capacity" 100)" ;; - "barinfo") battery="$(bar "$capacity" 100)${info_color} ${battery}" ;; - esac - - prin "${subtitle:+${subtitle}${bat: -1}}" "$battery" + bat="${bat/*axp288_fuel_gauge}" + prin "${subtitle:+${subtitle}${bat: -1}}" "$battery" + fi done return ;; From ea580434aa35f0bfa801f6769d4cd0c8107b6437 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 10 Apr 2017 21:37:09 +1000 Subject: [PATCH 174/308] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97dd871c..b504e8c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,10 @@ The screenshot feature no longer requires any configuration before working. We n - [MacOS] Added support for Spectacle. **[@jorgegonzalez](https://github.com/jorgegonzalez)** - [MacOS] Added support for Amethyst. **[@jorgegonzalez](https://github.com/jorgegonzalez)** +**Battery** + +- Added battery support for Bay Trail devices. **[@mstraube](https://github.com/mstraube)** + **Disk** - Added new option to only show dir name in subtitle. From 2094c134ceae6452796cebb08912e438b7849149 Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Mon, 10 Apr 2017 17:05:38 -0500 Subject: [PATCH 175/308] Fix --ascii_distro ubuntu-studio The ascii/distro directory has an ubuntu-studio file, which is documented in the --help text, but when I try to use that option, it falls back to the default Ubuntu logo. This change adds a case for Ubuntu-Studio to set ascii_file and the colors based on the logo at https://ubuntustudio.org. --- neofetch | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/neofetch b/neofetch index d3f35012..a4d6da0e 100755 --- a/neofetch +++ b/neofetch @@ -3287,6 +3287,11 @@ get_distro_colors() { ascii_file="ubuntu_old" ;; + "Ubuntu-Studio") + set_colors 6 7 + ascii_file="ubuntu-studio" + ;; + "Ubuntu"*) set_colors 1 7 3 ascii_file="ubuntu" From a76d3285b2e5389ea9dd320a77a019a787b43e67 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 11 Apr 2017 08:54:06 +1000 Subject: [PATCH 176/308] DOCS: CHANGELOG --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b504e8c0..7bc8e232 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - **[@eliezio](https://github.com/eliezio)** - **[@nilesr](https://github.com/nilesr)** - **[@dritter](https://github.com/dritter)** +- **[@@HebaruSan](https://github.com/HebaruSan)** ## Operating System @@ -26,9 +27,10 @@ The screenshot feature no longer requires any configuration before working. We n - `neofetch -s ~/test.png` will save a file in `~` called `test.png`. -## Ascii +## ASCII -- Arch ascii art now uses lighter colors. +- Arch ASCII art now uses lighter colors. +- Fixed Ubuntu-Studio ASCII setting. **[@@HebaruSan](https://github.com/HebaruSan)** - Update Parabola logo. **[@mstraube](https://github.com/mstraube)** From d55ff4ee9424499cf1ab027e57c6a8a2ce15617d Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Tue, 11 Apr 2017 19:03:17 +0200 Subject: [PATCH 177/308] Song: Add support for Deepin Music --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index a4d6da0e..758173d7 100755 --- a/neofetch +++ b/neofetch @@ -1284,7 +1284,7 @@ get_memory() { get_song() { # This is absurdly long. - player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet/ {printf $5 " " $6; exit}')" + player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music/ {printf $5 " " $6; exit}')" get_song_dbus() { # Multiple players use an almost identical dbus command to get the information. @@ -1312,6 +1312,7 @@ get_song() { "bluemindo"*) get_song_dbus "Bluemindo" ;; "guayadeque"*) get_song_dbus "guayadeque" ;; "yarock"*) get_song_dbus "yarock" ;; + "deepin-music"*) get_song_dbus "deepinmusic" ;; "audacious"*) song="$(audtool current-song)" From b8bcd13346a3c4623c7bd8514892023e1eec5a5a Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Tue, 11 Apr 2017 21:31:26 +0200 Subject: [PATCH 178/308] Song: Add support for Tomahawk --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 758173d7..c3a1e831 100755 --- a/neofetch +++ b/neofetch @@ -1284,7 +1284,7 @@ get_memory() { get_song() { # This is absurdly long. - player="$(ps x | awk '!(/awk|Helper|Cache/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music/ {printf $5 " " $6; exit}')" + player="$(ps x | awk '!(/ awk|Helper|Cache/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk/ {printf $5 " " $6; exit}')" get_song_dbus() { # Multiple players use an almost identical dbus command to get the information. @@ -1313,6 +1313,7 @@ get_song() { "guayadeque"*) get_song_dbus "guayadeque" ;; "yarock"*) get_song_dbus "yarock" ;; "deepin-music"*) get_song_dbus "deepinmusic" ;; + "tomahawk"*) get_song_dbus "tomahawk" ;; "audacious"*) song="$(audtool current-song)" From 83a0781a3fe2c64fda98bd9183b5d41a2582f774 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Wed, 12 Apr 2017 00:16:50 +0200 Subject: [PATCH 179/308] General: Align some lines --- neofetch | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/neofetch b/neofetch index c3a1e831..baef8e4c 100755 --- a/neofetch +++ b/neofetch @@ -1299,21 +1299,21 @@ get_song() { case "${player/*\/}" in "mpd"* | "mopidy"*) song="$(mpc current)" ;; - "mocp"*) song="$(mocp -Q "%artist - %song")" ;; - "google play"*) song="$(gpmdp-remote current)" ;; - "rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;; - "deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;; - "xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;; - "qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;; - "gnome-music"*) get_song_dbus "GnomeMusic" ;; - "lollypop"*) get_song_dbus "Lollypop" ;; - "clementine"*) get_song_dbus "clementine" ;; - "juk"*) get_song_dbus "juk" ;; - "bluemindo"*) get_song_dbus "Bluemindo" ;; - "guayadeque"*) get_song_dbus "guayadeque" ;; - "yarock"*) get_song_dbus "yarock" ;; + "mocp"*) song="$(mocp -Q "%artist - %song")" ;; + "google play"*) song="$(gpmdp-remote current)" ;; + "rhythmbox"*) song="$(rhythmbox-client --print-playing)" ;; + "deadbeef"*) song="$(deadbeef --nowplaying-tf '%artist% - %title%')" ;; + "xmms2d"*) song="$(xmms2 current -f '${artist} - ${title}')" ;; + "qmmp"*) song="$(qmmp --nowplaying '%p - %t')" ;; + "gnome-music"*) get_song_dbus "GnomeMusic" ;; + "lollypop"*) get_song_dbus "Lollypop" ;; + "clementine"*) get_song_dbus "clementine" ;; + "juk"*) get_song_dbus "juk" ;; + "bluemindo"*) get_song_dbus "Bluemindo" ;; + "guayadeque"*) get_song_dbus "guayadeque" ;; + "yarock"*) get_song_dbus "yarock" ;; "deepin-music"*) get_song_dbus "deepinmusic" ;; - "tomahawk"*) get_song_dbus "tomahawk" ;; + "tomahawk"*) get_song_dbus "tomahawk" ;; "audacious"*) song="$(audtool current-song)" From f5e55acc67d20106ed8ea181a84b196607d569cb Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 12 Apr 2017 10:39:27 +1000 Subject: [PATCH 180/308] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bc8e232..f738f72e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,8 @@ The screenshot feature no longer requires any configuration before working. We n **Song** +- Added support for Deepin Music. **[@mstraube](https://github.com/mstraube)** +- Added support for Tomahawk. **[@mstraube](https://github.com/mstraube)** - Fixed Audacious song output when `dbus-send` fails. **[@mstraube](https://github.com/mstraube)** **Local IP** From 11c8c289a87818d92fac9b98ab1fb39e8b4e355f Mon Sep 17 00:00:00 2001 From: obrevenge Date: Sat, 15 Apr 2017 11:52:22 -0500 Subject: [PATCH 181/308] added obrevenge and archlabs ascii --- ascii/distro/archlabs | 21 +++++++++++++++++++++ ascii/distro/obrevenge | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 ascii/distro/archlabs create mode 100644 ascii/distro/obrevenge diff --git a/ascii/distro/archlabs b/ascii/distro/archlabs new file mode 100644 index 00000000..4898b080 --- /dev/null +++ b/ascii/distro/archlabs @@ -0,0 +1,21 @@ +" + + sy + h--d + d---: + :----/N + :------/N + N/----:---+ + N/---+/ :--:o + N/--:/ ::::s + +--- ::::s + N+---+ ::::s + N+----o +:o s::::s + N/----:: s:::s h:::::s + N/----:::y::::+ o::::::o + N/---::::::::::s d::::::::+N + /--::::::::::::dd::::::::::+N + :-:::/+syhd NNN N dhys+/:::/ + d::+ydN /s+/d +hsd y\\. +" diff --git a/ascii/distro/obrevenge b/ascii/distro/obrevenge new file mode 100644 index 00000000..8d574af9 --- /dev/null +++ b/ascii/distro/obrevenge @@ -0,0 +1,21 @@ +" ${c1} + __ __ + _@@@@ @@@g_ + _@@@@@@ @@@@@@ + _@@@@@@M W@@@@@@_ + j@@@@P ^W@@@@ + @@@@L____ _____Q@@@@ + Q@@@@@@@@@@j@@@@@@@@@@ + @@@@@ T@j@ T@@@@@ + @@@@@ ___Q@J@ _@@@@@ + @@@@@fMMM@@j@jggg@@@@@@ + @@@@@ j@j@^MW@P @@@@ + Q@@@@@ggg@@f@ @@@@@@L + ^@@@@WWMMP ^ Q@@@@ + @@@@@_ _@@@@l + W@@@@@g_____g@@@@@P + @@@@@@@@@@@@@@@@l + ^W@@@@@@@@@@@P + ^TMMMMTll + + " From 87927bc81b8f4bf678212192d41285b279162bd2 Mon Sep 17 00:00:00 2001 From: obrevenge Date: Sat, 15 Apr 2017 22:00:20 -0500 Subject: [PATCH 182/308] removed whitespace, added ${c1} to archlabs, added both to get_distro_colors() --- ascii/distro/archlabs | 7 ++----- ascii/distro/obrevenge | 7 ++----- neofetch | 10 ++++++++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ascii/distro/archlabs b/ascii/distro/archlabs index 4898b080..37a16384 100644 --- a/ascii/distro/archlabs +++ b/ascii/distro/archlabs @@ -1,6 +1,4 @@ -" - - sy + "${c1}sy h--d d---: :----/N @@ -17,5 +15,4 @@ /--::::::::::::dd::::::::::+N :-:::/+syhd NNN N dhys+/:::/ d::+ydN /s+/d -hsd y\\. -" +hsd y\\." diff --git a/ascii/distro/obrevenge b/ascii/distro/obrevenge index 8d574af9..a626dfe1 100644 --- a/ascii/distro/obrevenge +++ b/ascii/distro/obrevenge @@ -1,5 +1,4 @@ -" ${c1} - __ __ + " ${c1}__ __ _@@@@ @@@g_ _@@@@@@ @@@@@@ _@@@@@@M W@@@@@@_ @@ -16,6 +15,4 @@ W@@@@@g_____g@@@@@P @@@@@@@@@@@@@@@@l ^W@@@@@@@@@@@P - ^TMMMMTll - - " + ^TMMMMTll" diff --git a/neofetch b/neofetch index baef8e4c..125a9da5 100755 --- a/neofetch +++ b/neofetch @@ -2829,6 +2829,11 @@ get_distro_colors() { ascii_file="arch" ;; + "ARCHlabs"*) + set_colors 6 6 7 1 + ascii_file="archlabs" + ;; + "Bitrig"*) set_colors 2 7 ascii_file="bitrig" @@ -3094,6 +3099,11 @@ get_distro_colors() { ascii_file="nixos" ;; + "OBRevenge"*) + set_colors 1 7 3 + ascii_file="obrevenge" + ;; + "openbsd_small") set_colors 3 7 6 1 8 ascii_file="openbsd_small" From 6b926485f16549a064ad3f1e68df208076cebb52 Mon Sep 17 00:00:00 2001 From: LER0ever Date: Mon, 24 Apr 2017 13:49:34 -0500 Subject: [PATCH 183/308] OS: add Chrome OS crouton support --- neofetch | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neofetch b/neofetch index baef8e4c..e18db77f 100755 --- a/neofetch +++ b/neofetch @@ -63,6 +63,13 @@ get_distro() { *) distro="$(lsb_release -sd) on Windows 10" ;; esac + elif [[ "$(< /proc/version)" == *"cros"* || -f "/dev/cros_ec" ]]; then + case "$distro_shorthand" in + "on") distro="$(lsb_release -sir) [Chrome OS]" ;; + "tiny") distro="Chrome OS" ;; + *) distro="$(lsb_release -sd) on Chrome OS" ;; + esac + elif [[ -f "/etc/GoboLinuxVersion" ]]; then case "$distro_shorthand" in "on" | "tiny") distro="GoboLinux" ;; From 832c7bbd818480277f90f7115e1be4b839e37aef Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 25 Apr 2017 12:40:45 +1000 Subject: [PATCH 184/308] Docs: Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f738f72e..b8ef1615 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,12 @@ - **[@nilesr](https://github.com/nilesr)** - **[@dritter](https://github.com/dritter)** - **[@@HebaruSan](https://github.com/HebaruSan)** +- **[@LER0ever](https://github.com/LER0ever)** ## Operating System +- Added Chrome OS Crouton support. **[@LER0ever](https://github.com/LER0ever)** - Added support for SliTaz. **[@nilesr](https://github.com/nilesr)** - Added support for Nitrux. **[@mstraube](https://github.com/mstraube)** - Added support for DesaOS. From 36203d19191f9facca030c7e7b23d76faf348fbd Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 25 Apr 2017 12:44:41 +1000 Subject: [PATCH 185/308] Ascii: Fix ascii art --- ascii/distro/archlabs | 36 ++++++++++++++++++------------------ ascii/distro/obrevenge | 36 ++++++++++++++++++------------------ neofetch | 10 +++++----- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/ascii/distro/archlabs b/ascii/distro/archlabs index 37a16384..e81e70a9 100644 --- a/ascii/distro/archlabs +++ b/ascii/distro/archlabs @@ -1,18 +1,18 @@ - "${c1}sy - h--d - d---: - :----/N - :------/N - N/----:---+ - N/---+/ :--:o - N/--:/ ::::s - +--- ::::s - N+---+ ::::s - N+----o +:o s::::s - N/----:: s:::s h:::::s - N/----:::y::::+ o::::::o - N/---::::::::::s d::::::::+N - /--::::::::::::dd::::::::::+N - :-:::/+syhd NNN N dhys+/:::/ - d::+ydN /s+/d -hsd y\\." +${c1} sy + h--d + d---: + :----/N + :------/N + N/----:---+ + N/---+/ :--:o + N/--:/ ::::s + +--- ::::s + N+---+ ::::s + N+----o +:o s::::s + N/----:: s:::s h:::::s + N/----:::y::::+ o::::::o + N/---::::::::::s d::::::::+N + /--::::::::::::dd::::::::::+N + :-:::/+syhd NNN N dhys+/:::/ + d::+ydN /s+/d +hsd y\\. diff --git a/ascii/distro/obrevenge b/ascii/distro/obrevenge index a626dfe1..87b50f40 100644 --- a/ascii/distro/obrevenge +++ b/ascii/distro/obrevenge @@ -1,18 +1,18 @@ - " ${c1}__ __ - _@@@@ @@@g_ - _@@@@@@ @@@@@@ - _@@@@@@M W@@@@@@_ - j@@@@P ^W@@@@ - @@@@L____ _____Q@@@@ - Q@@@@@@@@@@j@@@@@@@@@@ - @@@@@ T@j@ T@@@@@ - @@@@@ ___Q@J@ _@@@@@ - @@@@@fMMM@@j@jggg@@@@@@ - @@@@@ j@j@^MW@P @@@@ - Q@@@@@ggg@@f@ @@@@@@L - ^@@@@WWMMP ^ Q@@@@ - @@@@@_ _@@@@l - W@@@@@g_____g@@@@@P - @@@@@@@@@@@@@@@@l - ^W@@@@@@@@@@@P - ^TMMMMTll" +${c1} __ __ + _@@@@ @@@g_ + _@@@@@@ @@@@@@ + _@@@@@@M W@@@@@@_ + j@@@@P ^W@@@@ + @@@@L____ _____Q@@@@ +Q@@@@@@@@@@j@@@@@@@@@@ +@@@@@ T@j@ T@@@@@ +@@@@@ ___Q@J@ _@@@@@ +@@@@@fMMM@@j@jggg@@@@@@ +@@@@@ j@j@^MW@P @@@@ +Q@@@@@ggg@@f@ @@@@@@L +^@@@@WWMMP ^ Q@@@@ + @@@@@_ _@@@@l + W@@@@@g_____g@@@@@P + @@@@@@@@@@@@@@@@l + ^W@@@@@@@@@@@P + ^TMMMMTll diff --git a/neofetch b/neofetch index 75301756..7b2459dd 100755 --- a/neofetch +++ b/neofetch @@ -2831,16 +2831,16 @@ get_distro_colors() { ascii_file="archbox" ;; - "Arch"*) - set_colors 6 6 7 1 - ascii_file="arch" - ;; - "ARCHlabs"*) set_colors 6 6 7 1 ascii_file="archlabs" ;; + "Arch"*) + set_colors 6 6 7 1 + ascii_file="arch" + ;; + "Bitrig"*) set_colors 2 7 ascii_file="bitrig" From f24432a63a739f004eb00841e8a330a890042776 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 25 Apr 2017 12:46:29 +1000 Subject: [PATCH 186/308] Docs: Changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8ef1615..be75bad9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - **[@dritter](https://github.com/dritter)** - **[@@HebaruSan](https://github.com/HebaruSan)** - **[@LER0ever](https://github.com/LER0ever)** +- **[@obrevenge](https://github.com/obrevenge)** ## Operating System @@ -17,6 +18,8 @@ - Added support for Nitrux. **[@mstraube](https://github.com/mstraube)** - Added support for DesaOS. - Added support for MinGW. +- Added support for OBRevenge. **[@obrevenge](https://github.com/obrevenge)** +- Added support for ArchLabs. **[@obrevenge](https://github.com/obrevenge)** ## Screenshot From eda671d732d3748b98f96f41144dfa53c0cb6e57 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 25 Apr 2017 12:52:16 +1000 Subject: [PATCH 187/308] Ascii: New raspbian ascii art --- ascii/distro/raspbian | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/ascii/distro/raspbian b/ascii/distro/raspbian index 3da139fc..717001bf 100644 --- a/ascii/distro/raspbian +++ b/ascii/distro/raspbian @@ -1,18 +1,23 @@ -${c1} .',;:cc;,'. .,;::c:,,. - ,ooolcloooo: 'oooooccloo: - .looooc;;:ol :oc;;:ooooo' - ;oooooo: ,ooooooc. - .,:;'. .;:;'. - ${c2}.... ..'''''. .... - .''. ..'''''. ..''. - .. ..... ..... .. - . .''''''' .''''''. . -.'' .'''''''' .'''''''. ''. -''' ''''''' .'''''' ''' -.' ........... ... .'. - .... ''''''''. .''. - '''''. ''''''''. .''''' - '''''. .'''''. .'''''. - ..''. . .''.. - .''''''' - ...... +${c1} `.::///+:/-. --///+//-:`` + `+oooooooooooo: `+oooooooooooo: + /oooo++//ooooo: ooooo+//+ooooo. + `+ooooooo:-:oo- +o+::/ooooooo: + `:oooooooo+`` `.oooooooo+- + `:++ooo/. :+ooo+/.` + ...` ${c2}`.----.`${c1} ``.. +${c2} .::::-``:::::::::.`-:::-` + -:::-` .:::::::-` `-:::- + `::. `.--.` `` `.---.``.::` + .::::::::` -::::::::` ` + .::` .:::::::::- `::::::::::``::. +-:::` ::::::::::. ::::::::::.`:::- +:::: -::::::::. `-:::::::: :::: +-::- .-:::-.``....``.-::-. -::- + .. `` .::::::::. `..`.. + -:::-` -::::::::::` .:::::` + :::::::` -::::::::::` :::::::. + .::::::: -::::::::. :::::::: + `-:::::` ..--.` ::::::. + `...` `...--..` `...` + .:::::::::: + `.-::::-` From 23f0e9d2000bd49903226f930056a355998c122e Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 25 Apr 2017 12:52:53 +1000 Subject: [PATCH 188/308] Docs: Changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be75bad9..22cb3eed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,8 @@ The screenshot feature no longer requires any configuration before working. We n - Arch ASCII art now uses lighter colors. - Fixed Ubuntu-Studio ASCII setting. **[@@HebaruSan](https://github.com/HebaruSan)** -- Update Parabola logo. **[@mstraube](https://github.com/mstraube)** +- Updated Parabola logo. **[@mstraube](https://github.com/mstraube)** +- Updated Raspbian ASCII art. ## Images From 9c48d2548abcd23b54d8db16da8c7ee528b04796 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 25 Apr 2017 12:55:09 +1000 Subject: [PATCH 189/308] Ascii: Update raspbian --- ascii/distro/raspbian | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ascii/distro/raspbian b/ascii/distro/raspbian index 717001bf..472b74eb 100644 --- a/ascii/distro/raspbian +++ b/ascii/distro/raspbian @@ -4,8 +4,8 @@ ${c1} `.::///+:/-. --///+//-:`` `+ooooooo:-:oo- +o+::/ooooooo: `:oooooooo+`` `.oooooooo+- `:++ooo/. :+ooo+/.` - ...` ${c2}`.----.`${c1} ``.. -${c2} .::::-``:::::::::.`-:::-` + ${c2}...` `.----.` ``.. + .::::-``:::::::::.`-:::-` -:::-` .:::::::-` `-:::- `::. `.--.` `` `.---.``.::` .::::::::` -::::::::` ` From e506315bac7b36d1fbce5852fcea287c7064ca63 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 25 Apr 2017 13:01:27 +1000 Subject: [PATCH 190/308] Version: Bump version to 3.1.0 --- CHANGELOG.md | 5 ++++- config/config | 2 +- neofetch | 2 +- neofetch.1 | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22cb3eed..5a2a4fc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,17 @@ ## Contributors +- **[@konimex](https://github.com/konimex)** - **[@mstraube](https://github.com/mstraube)** - **[@jorgegonzalez](https://github.com/jorgegonzalez)** - **[@ikeydoherty](https://github.com/ikeydoherty)** - **[@eliezio](https://github.com/eliezio)** - **[@nilesr](https://github.com/nilesr)** - **[@dritter](https://github.com/dritter)** -- **[@@HebaruSan](https://github.com/HebaruSan)** +- **[@HebaruSan](https://github.com/HebaruSan)** - **[@LER0ever](https://github.com/LER0ever)** - **[@obrevenge](https://github.com/obrevenge)** +- **[@ajjames31](https://github.com/ajjames31)** +- Eliezio Oliveira ## Operating System diff --git a/config/config b/config/config index 53add8f2..6237ccd9 100644 --- a/config/config +++ b/config/config @@ -714,4 +714,4 @@ image_host="teknik" # # NOTE: Don't change this value, neofetch reads this to determine # how to handle backwards compatibility. -config_version="3.0.2" +config_version="3.1.0" diff --git a/neofetch b/neofetch index 7b2459dd..0ffba95b 100755 --- a/neofetch +++ b/neofetch @@ -9,7 +9,7 @@ # https://github.com/dylanaraps/ # Neofetch version. -version="3.0.2" +version="3.1.0" bash_version="${BASH_VERSION/.*}" sys_locale="${LANG:-C}" diff --git a/neofetch.1 b/neofetch.1 index 30fc4e92..c803bfd1 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.0.2" "User Commands" +.TH NEOFETCH "1" "April 2017" "Neofetch 3.1.0" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS From 72e4e35b285fe43c74c0c1f5ce80a99f7d204342 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 25 Apr 2017 13:06:47 +1000 Subject: [PATCH 191/308] Docs: Clear changelog --- CHANGELOG.md | 102 --------------------------------------------------- 1 file changed, 102 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a2a4fc6..e9652019 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,104 +1,2 @@ ## Contributors -- **[@konimex](https://github.com/konimex)** -- **[@mstraube](https://github.com/mstraube)** -- **[@jorgegonzalez](https://github.com/jorgegonzalez)** -- **[@ikeydoherty](https://github.com/ikeydoherty)** -- **[@eliezio](https://github.com/eliezio)** -- **[@nilesr](https://github.com/nilesr)** -- **[@dritter](https://github.com/dritter)** -- **[@HebaruSan](https://github.com/HebaruSan)** -- **[@LER0ever](https://github.com/LER0ever)** -- **[@obrevenge](https://github.com/obrevenge)** -- **[@ajjames31](https://github.com/ajjames31)** -- Eliezio Oliveira - - -## Operating System - -- Added Chrome OS Crouton support. **[@LER0ever](https://github.com/LER0ever)** -- Added support for SliTaz. **[@nilesr](https://github.com/nilesr)** -- Added support for Nitrux. **[@mstraube](https://github.com/mstraube)** -- Added support for DesaOS. -- Added support for MinGW. -- Added support for OBRevenge. **[@obrevenge](https://github.com/obrevenge)** -- Added support for ArchLabs. **[@obrevenge](https://github.com/obrevenge)** - - -## Screenshot - -The screenshot feature no longer requires any configuration before working. We no longer hardcode `${HOME}/Pictures/neofetch` as the screenshot location. Here's how the `-s` and `-su` flags now function: - -- `neofetch -s` will save a file in the current directory named: `neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png` -- `neofetch -s test.png` will save a file in the current directory called `test.png` -- `neofetch -s ~/` will save a file in `~` called `neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png` -- `neofetch -s ~/test.png` will save a file in `~` called `test.png`. - - -## ASCII - -- Arch ASCII art now uses lighter colors. -- Fixed Ubuntu-Studio ASCII setting. **[@@HebaruSan](https://github.com/HebaruSan)** -- Updated Parabola logo. **[@mstraube](https://github.com/mstraube)** -- Updated Raspbian ASCII art. - - -## Images - -- Added `libsixel` backend. -- Added `termpix` backend. -- Only use a zero width space in the `w3m` backend. -- Fixed bug causing terminal size to not be found. -- [iTerm2] Fixed images not appearing inside `tmux`. - - -## Info - -**Locale** - -- Added a new function to display system locale. (Disabled by default) - -**CPU** - -- Added option to show decimals in CPU speed. - -**Terminal Font** - -- Added \*experimental\* font detection for iTerm2. **[@dritter](https://github.com/dritter)** - -**Window Manager** - -- [MacOS] Added support for Kwm. **[@jorgegonzalez](https://github.com/jorgegonzalez)** -- [MacOS] Added support for Spectacle. **[@jorgegonzalez](https://github.com/jorgegonzalez)** -- [MacOS] Added support for Amethyst. **[@jorgegonzalez](https://github.com/jorgegonzalez)** - -**Battery** - -- Added battery support for Bay Trail devices. **[@mstraube](https://github.com/mstraube)** - -**Disk** - -- Added new option to only show dir name in subtitle. - -**Song** - -- Added support for Deepin Music. **[@mstraube](https://github.com/mstraube)** -- Added support for Tomahawk. **[@mstraube](https://github.com/mstraube)** -- Fixed Audacious song output when `dbus-send` fails. **[@mstraube](https://github.com/mstraube)** - -**Local IP** - -- [Linux] Fixed UID showing instead of Local IP on several versions/configs of iproute2. - -**Packages** - -- [eopkg] Use a faster detection method. **[@ikeydoherty](https://github.com/ikeydoherty)** - -**Resolution** - -- [macOS] Fixed `screenresolution` not appearing at all on newer versions. **[@eliezio](https://github.com/eliezio)** -- [Linux] Show decimals. - -**GPU** - -- [Linux] Hide duplicate GPU lines (Only display 1). From 1948f0e4ffbd087f07c07948b27962cb6b895932 Mon Sep 17 00:00:00 2001 From: Matthew Cox Date: Tue, 25 Apr 2017 19:36:49 +0100 Subject: [PATCH 192/308] Fix termite font matching Each config parameter is allowed arbitrary whitespace before it. It took me a long time to work out why it was always returning the /etc/xdg/termite/config value! --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 0ffba95b..83fa6718 100755 --- a/neofetch +++ b/neofetch @@ -1756,7 +1756,7 @@ get_term_font() { "termite") [[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && termite_config="${XDG_CONFIG_HOME}/termite/config" - term_font="$(awk -F '= ' '/\[options\]/ {opt=1} /^font/ {if(opt==1) a=$2; opt=0} END{print a}' "/etc/xdg/termite/config" "$termite_config")" + term_font="$(awk -F '= ' '/\[options\]/ {opt=1} /^\s*font/ {if(opt==1) a=$2; opt=0} END{print a}' "/etc/xdg/termite/config" "$termite_config")" ;; "urxvt" | "urxvtd" | "rxvt-unicode" | "xterm") From eeaae2d5543005e537fb91e13c11d61657a1c9ab Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 26 Apr 2017 07:29:05 +1000 Subject: [PATCH 193/308] Docs: CHANGELOG --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9652019..65157d9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,11 @@ ## Contributors +- **[@MatthewCox](https://github.com/MatthewCox)** + + +## Info + +**Terminal Emulator** + +- [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)** + From a1d87ea105e8ec9dc236cfcb3e3f2e0418ded645 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 26 Apr 2017 07:39:10 +1000 Subject: [PATCH 194/308] Image: Added --loop flag. --- config/config | 10 ++++++++++ neofetch | 5 +++++ neofetch.1 | 3 +++ 3 files changed, 18 insertions(+) diff --git a/config/config b/config/config index 6237ccd9..baaf7d38 100644 --- a/config/config +++ b/config/config @@ -540,6 +540,7 @@ disk_display="off" # Backend Settings + # Image backend. # # Default: 'ascii' @@ -602,6 +603,15 @@ ascii_bold="on" # Image Options +# Image loop +# Setting this to on will make neofetch redraw the image constantly until +# Ctrl+C is pressed. This fixes display issues in some terminal emulators. +# +# Default: 'off' +# Values: 'on', 'off' +# Flag: --loop +image_loop="off" + # Thumbnail directory # # Default: '~/.cache/thumbnails/neofetch' diff --git a/neofetch b/neofetch index 83fa6718..491da0f3 100755 --- a/neofetch +++ b/neofetch @@ -3967,6 +3967,7 @@ ASCII: Possible values: bar, infobar, barinfo, off IMAGE: + --loop Redraw the image constantly until Ctrl+C is used. This fixes issues in some terminals emulators when using image mode. --size 00px | --size 00% How to size the image. Possible values: auto, 00px, 00%, none --crop_mode mode Which crop mode to use @@ -4151,6 +4152,7 @@ get_args() { ;; # Image options + "--loop") image_loop="on" ;; "--image_size" | "--size") image_size="$2" ;; "--crop_mode") crop_mode="$2" ;; "--crop_offset") crop_offset="$2" ;; @@ -4255,6 +4257,9 @@ main() { # Show error messages. [[ "$verbose" == "on" ]] && printf "%b" "$err" >&2 + # If `--loop` was used, constantly redraw the image. + while [[ "$image_loop" == "on" && "$image_backend" == "w3m" ]]; do display_image; sleep 1s; done + return 0 } diff --git a/neofetch.1 b/neofetch.1 index c803bfd1..aa7d418b 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -247,6 +247,9 @@ Hide the info text and only show the ascii logo. Possible values: bar, infobar, barinfo, off .SS "IMAGE:" .TP +\fB\-\-loop\fR +Redraw the image constantly until Ctrl+C is used. This fixes issues in some terminals emulators when using image mode. +.TP \fB\-\-size\fR 00px | \fB\-\-size\fR 00% How to size the image. Possible values: auto, 00px, 00%, none From 04cf863f7870a85816437bf07a78d68e96e2150b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 26 Apr 2017 07:42:01 +1000 Subject: [PATCH 195/308] Docs: Changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65157d9d..172881aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ - **[@MatthewCox](https://github.com/MatthewCox)** +## 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. + + ## Info **Terminal Emulator** From 74e8facfe274b275a50bba57d96523eb7e963ded Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 26 Apr 2017 08:12:35 +1000 Subject: [PATCH 196/308] GPU: Correctly filter out duplicate GPU names. --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 491da0f3..938f0b96 100755 --- a/neofetch +++ b/neofetch @@ -1071,7 +1071,7 @@ get_gpu() { "Linux") # Read GPUs into array. IFS=$'\n' - gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '!a[$0]++ && /"Display|"3D|"VGA/ {print $3 " " $4}')) + gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}' | sort -u)) IFS="$old_ifs" # Number the GPUs if more than one exists. From 781a0fff9bdd46417776b6aa4d70c9fefb44ad79 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 26 Apr 2017 08:13:31 +1000 Subject: [PATCH 197/308] Docs: CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 172881aa..2195b801 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,3 +16,6 @@ - [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)** +**GPU** + +- [Linux] Fixed GPU sort. From b0cd5f07ec3789b6918625ea67dd3057f65254dd Mon Sep 17 00:00:00 2001 From: dylan araps Date: Wed, 26 Apr 2017 11:48:22 +1000 Subject: [PATCH 198/308] General: Bump version numbers --- config/config | 2 +- neofetch | 2 +- neofetch.1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config b/config/config index 6237ccd9..4e419715 100644 --- a/config/config +++ b/config/config @@ -714,4 +714,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" +config_version="3.1.0-git" diff --git a/neofetch b/neofetch index 0ffba95b..323ce35a 100755 --- a/neofetch +++ b/neofetch @@ -9,7 +9,7 @@ # https://github.com/dylanaraps/ # Neofetch version. -version="3.1.0" +version="3.1.0-git" bash_version="${BASH_VERSION/.*}" sys_locale="${LANG:-C}" diff --git a/neofetch.1 b/neofetch.1 index c803bfd1..583a171f 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" "User Commands" +.TH NEOFETCH "1" "April 2017" "Neofetch 3.1.0-git" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS From 05503e39146261fae20895f773396877fdc83b20 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Wed, 26 Apr 2017 12:32:41 +1000 Subject: [PATCH 199/308] GPU: Fix unique cpu filter --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 415d7c89..4150036e 100755 --- a/neofetch +++ b/neofetch @@ -1071,7 +1071,7 @@ get_gpu() { "Linux") # Read GPUs into array. IFS=$'\n' - gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}' | sort -u)) + gpus=($(lspci -mm | awk -F '\\"|\\" \\"|\(' '/"Display|"3D|"VGA/ {print $3 " " $4}' | sort -u)) IFS="$old_ifs" # Number the GPUs if more than one exists. From 874a29e0c3c5ac2d25fc9c44c9f19fdec25ec0ee Mon Sep 17 00:00:00 2001 From: dawidd6 Date: Wed, 26 Apr 2017 21:06:47 +0200 Subject: [PATCH 200/308] do not detect ibus* or indicator* as player --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 4150036e..53ba7c5b 100755 --- a/neofetch +++ b/neofetch @@ -1291,7 +1291,7 @@ get_memory() { get_song() { # This is absurdly long. - player="$(ps x | awk '!(/ awk|Helper|Cache/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk/ {printf $5 " " $6; exit}')" + player="$(ps x | awk '!(/ awk|Helper|Cache|ibus|indicator/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk/ {printf $5 " " $6; exit}')" get_song_dbus() { # Multiple players use an almost identical dbus command to get the information. From c48f201a9d987f41caf786831dd1bb635e4774b2 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 27 Apr 2017 09:07:32 +1000 Subject: [PATCH 201/308] Docs: CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2195b801..19b08256 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Contributors - **[@MatthewCox](https://github.com/MatthewCox)** +- **[@dawidd6](https://github.com/dawidd6)** ## Images @@ -19,3 +20,7 @@ **GPU** - [Linux] Fixed GPU sort. + +**Song** + +- Do not detect ibus\* or indicator\* as player. **[@dawidd6](https://github.com/dawidd6)** From efd48587c38e53a832e6cb9abd142a865778c1d2 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 27 Apr 2017 09:09:36 +1000 Subject: [PATCH 202/308] GPU: Revert unique filter --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 53ba7c5b..b85745f3 100755 --- a/neofetch +++ b/neofetch @@ -1071,7 +1071,7 @@ get_gpu() { "Linux") # Read GPUs into array. IFS=$'\n' - gpus=($(lspci -mm | awk -F '\\"|\\" \\"|\(' '/"Display|"3D|"VGA/ {print $3 " " $4}' | sort -u)) + gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}')) IFS="$old_ifs" # Number the GPUs if more than one exists. From 6c957f3ba2ac7cc91f0c5dc5110f9f771a482c4a Mon Sep 17 00:00:00 2001 From: dylan araps Date: Thu, 27 Apr 2017 13:37:33 +1000 Subject: [PATCH 203/308] 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 204/308] 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 3025c2a8c47ef0ad4bbcc47c6aba98a3982ea700 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Fri, 28 Apr 2017 11:24:30 +1000 Subject: [PATCH 205/308] 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 206/308] 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 207/308] 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 208/308] 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 209/308] 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 210/308] 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 211/308] 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 212/308] 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 213/308] 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 214/308] 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 215/308] 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 00e2006e48c44fcbc807a51ee383d495f7b96cf7 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 8 May 2017 17:38:05 +0700 Subject: [PATCH 216/308] 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 217/308] 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 218/308] 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 219/308] 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 41e61fd4415568d0424561c0a5aafc03549793b9 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Mon, 8 May 2017 16:44:13 +0200 Subject: [PATCH 220/308] 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 221/308] 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 222/308] 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 223/308] 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 224/308] 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 ff3f0198d7cd193603ae6404ba37f60c45d0da6e Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 10 May 2017 23:35:38 +0700 Subject: [PATCH 225/308] 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 226/308] 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 762820f13695e09d5064e3b66e652460986a775e Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 12 May 2017 18:42:04 +0200 Subject: [PATCH 227/308] 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 228/308] 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 229/308] 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 2212cab6880250bfb8cc5645504f0b7a554f1f2a Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 13 May 2017 11:36:30 +0700 Subject: [PATCH 230/308] 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 231/308] 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 232/308] 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 233/308] 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 234/308] 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 235/308] 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 0c602800f5ed6d25cfe50272444cd488cf0df257 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 18 May 2017 09:52:34 +1000 Subject: [PATCH 236/308] 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 237/308] 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 238/308] 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 239/308] 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 240/308] 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 241/308] 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 242/308] 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 243/308] 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 244/308] 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 245/308] 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 246/308] 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 247/308] 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 7f173060806f53a1a0c116a36efcfa7e65fe3d7b Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 22 May 2017 16:50:24 +0700 Subject: [PATCH 248/308] 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 249/308] 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 ece5ccf44b995843e4cd747352f09f4ae23b4a7c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 24 May 2017 09:56:49 +1000 Subject: [PATCH 250/308] 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 251/308] 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 252/308] 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 b88e86e8562fd7404baf934e0c463ea5d0aba1be Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 24 May 2017 11:42:38 +0700 Subject: [PATCH 253/308] 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 254/308] 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 255/308] 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 767cd93f38fa368c1f02b01f919ac6672867b2ee Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Fri, 26 May 2017 09:21:22 +1000 Subject: [PATCH 256/308] 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 257/308] 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 258/308] 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 259/308] 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 260/308] 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 261/308] 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 262/308] 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 263/308] 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 264/308] 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 265/308] 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 266/308] 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 267/308] 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 fd8f5145cbba314d6f03616065d5f49a05c7ae3d Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 9 Jun 2017 23:20:01 +0700 Subject: [PATCH 268/308] 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 04bdb70227d9df1ee19aa8d129ea3d636b9969fe Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 9 Jun 2017 23:36:25 +0700 Subject: [PATCH 269/308] 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 270/308] 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 271/308] 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 272/308] 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)** From 3b82a89c248661cff51a44e4e78189ee3e09747c Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 10 Jun 2017 13:27:23 +0700 Subject: [PATCH 273/308] 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 3863fec23e042a1873396496770cb4751db2ef2d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 14 Jun 2017 13:23:44 +1000 Subject: [PATCH 274/308] scrot: Skip import on MacOS --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 17965dfd..cdbd2897 100755 --- a/neofetch +++ b/neofetch @@ -248,7 +248,7 @@ get_model() { fi ;; - "Mac OS X") + "Mac OS X") if [[ "$(kextstat | grep "FakeSMC")" != "" ]]; then model="Hackintosh (SMBIOS: $(sysctl -n hw.model))" else @@ -2662,7 +2662,7 @@ scrot_program() { elif type -p maim >/dev/null; then scrot_program=(maim) - elif type -p import >/dev/null; then + elif type -p import >/dev/null && [[ "$os" != "Mac OS X" ]]; then scrot_program=(import -window root) elif type -p imlib2_grab >/dev/null; then From 34800b66654eaf8bb1e9228360fe22c7a8af34a8 Mon Sep 17 00:00:00 2001 From: LER0ever Date: Thu, 15 Jun 2017 18:46:59 +0800 Subject: [PATCH 275/308] terminal: add support for Neovim terminal emulator --- neofetch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/neofetch b/neofetch index cdbd2897..3b29e2cf 100755 --- a/neofetch +++ b/neofetch @@ -1669,6 +1669,8 @@ get_term() { "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;; "gnome-terminal-") term="gnome-terminal" ;; + *"nvim") term="Neovim Terminal" ;; + *"NeoVimServer"*) term="VimR Terminal" ;; *) term="${name##*/}" ;; esac fi From 3259fc7b177afbbea8b2cd29067d8e89c800db88 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 15 Jun 2017 21:00:27 +1000 Subject: [PATCH 276/308] Docs: Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2de9e40..72fe8f59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ **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. From 82ddddfda5039ce25b5b0a70f0148b5cb043cc1b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 16 Jun 2017 14:44:21 +1000 Subject: [PATCH 277/308] OS: Added support for CloverOS --- ascii/distro/cloveros | 20 ++++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 ascii/distro/cloveros diff --git a/ascii/distro/cloveros b/ascii/distro/cloveros new file mode 100644 index 00000000..9996c77c --- /dev/null +++ b/ascii/distro/cloveros @@ -0,0 +1,20 @@ +${c1} `omo``omo` + `oNMMMNNMMMNo` + `oNMMMMMMMMMMMMNo` + oNMMMMMMMMMMMMMMMMNo + `sNMMMMMMMMMMMMMMNs` + `omo` `sNMMMMMMMMMMNs` `omo` + `oNMMMNo` `sNMMMMMMNs` `oNMMMNo` + `oNMMMMMMMNo` `oNMMNs` `oNMMMMMMMNo` +oNMMMMMMMMMMMNo` `sy` `oNMMMMMMMMMMMNo +`sNMMMMMMMMMMMMNo.${c2}oNNs${c1}.oNMMMMMMMMMMMMNs` +`oNMMMMMMMMMMMMNs.${c2}oNNs${c1}.oNMMMMMMMMMMMMNo` +oNMMMMMMMMMMMNs` `sy` `oNMMMMMMMMMMMNo + `oNMMMMMMMNs` `oNMMNo` `oNMMMMMMMNs` + `oNMMMNs` `sNMMMMMMNs` `oNMMMNs` + `oNs` `sNMMMMMMMMMMNs` `oNs` + `sNMMMMMMMMMMMMMMNs` + +NMMMMMMMMMMMMMMMMNo + `oNMMMMMMMMMMMMNo` + `oNMMMNNMMMNs` + `omo``oNs` diff --git a/neofetch b/neofetch index cdbd2897..cd17e411 100755 --- a/neofetch +++ b/neofetch @@ -2957,6 +2957,11 @@ get_distro_colors() { ascii_file="chrome" ;; + "Clover"*) + set_colors 2 6 + ascii_file="cloveros" + ;; + "crux_small") set_colors 4 5 7 6 ascii_file="crux_small" From e383e6dfa46e5965b84f077eacc3a836f9c78af3 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 16 Jun 2017 14:45:10 +1000 Subject: [PATCH 278/308] DOCS: Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72fe8f59..d7a7690b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ## Operating System - 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)** From 96103a757f43c194860fffa7f52f9a65576fee40 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 20 Jun 2017 15:14:45 +0700 Subject: [PATCH 279/308] Misc: Removed Makefile and added install script --- Makefile | 20 -------------------- install.sh | 31 +++++++++++++++++++++++++++++++ neofetch | 38 ++++++++------------------------------ 3 files changed, 39 insertions(+), 50 deletions(-) delete mode 100644 Makefile create mode 100755 install.sh diff --git a/Makefile b/Makefile deleted file mode 100644 index b7d4105f..00000000 --- a/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -PREFIX = /usr - -all: - @echo Run \'make install\' to install Neofetch - -install: - mkdir -p $(DESTDIR)$(PREFIX)/bin - mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 - mkdir -p $(DESTDIR)/etc/neofetch - mkdir -p $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro - cp -p neofetch $(DESTDIR)$(PREFIX)/bin/neofetch - cp -p neofetch.1 $(DESTDIR)$(PREFIX)/share/man/man1/neofetch.1 - cp -p config/config $(DESTDIR)/etc/neofetch/config - cp -p ascii/distro/* $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro - -uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/neofetch - rm -f $(DESTDIR)$(PREFIX)/share/man/man1/neofetch.1 - rm -f -r $(DESTDIR)$(PREFIX)/share/neofetch - rm -f -r $(DESTDIR)/etc/neofetch diff --git a/install.sh b/install.sh new file mode 100755 index 00000000..99a7baa9 --- /dev/null +++ b/install.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +while [[ "$1" ]]; do + case "$1" in + "--destdir") DESTDIR="$2" ;; + "--bindir") BINDIR="$2" ;; + "--confdir") CONFDIR="$2" ;; + "--prefix") PREFIX="$2" ;; + "--asciidir") ASCIIDIR="$2" ;; + "--mandir") MANDIR="$2" ;; + esac + shift +done + +[[ -z "$BINDIR" ]] && BINDIR="/usr/bin" +[[ -z "$CONFDIR" ]] && CONFDIR="/etc/neofetch" +[[ -z "$ASCIIDIR" ]] && ASCIIDIR="/usr/share/neofetch/ascii/distro" +[[ -z "$MANDIR" ]] && MANDIR="/usr/share/man/man1" + +mkdir -p "${DESTDIR}""${PREFIX}""${BINDIR}" +mkdir -p "${DESTDIR}""${PREFIX}""${CONFDIR}" +mkdir -p "${DESTDIR}""${PREFIX}""${ASCIIDIR}" +mkdir -p "${DESTDIR}""${PREFIX}""${MANDIR}" + +sed -i -e "s|CONFDIR|/${PREFIX}${CONFDIR}|g" neofetch +sed -i -e "s|ASCIIDIR|/${PREFIX}${ASCIIDIR}|g" neofetch + +cp -p neofetch "${DESTDIR}""${PREFIX}""${BINDIR}" +cp -p config/config "${DESTDIR}""${PREFIX}""${CONFDIR}" +cp -p ascii/distro/* "${DESTDIR}""${PREFIX}""${ASCIIDIR}" +cp -p neofetch.1 "${DESTDIR}""${PREFIX}""${MANDIR}" diff --git a/neofetch b/neofetch index f53ff1c7..1627499f 100755 --- a/neofetch +++ b/neofetch @@ -2171,18 +2171,9 @@ get_ascii() { [[ "$image_source" =~ \.(png|jpg|jpe|jpeg|gif)$ ]] && \ err "Image: Source is image file but ascii backend was selected. Using distro ascii." - if [[ -d "/usr/share/neofetch/ascii/distro" ]]; then - ascii_dir="/usr/share/neofetch/ascii/distro" - - elif [[ -d "/usr/local/share/neofetch/ascii/distro" ]]; then - ascii_dir="/usr/local/share/neofetch/ascii/distro" - - elif [[ -d "/data/data/com.termux/files/usr/share/neofetch/ascii/distro" ]]; then - ascii_dir="/data/data/com.termux/files/usr/share/neofetch/ascii/distro" - - elif [[ -d "/boot/home/config/non-packaged/share/neofetch/ascii/distro" ]]; then - ascii_dir="/boot/home/config/non-packaged/share/neofetch/ascii/distro" - + # Note: ASCIIDIR here is a placeholder -- it will be replaced with your ASCII directory. + if [[ -d "ASCIIDIR" ]]; then + ascii_dir="ASCIIDIR" else [[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")" ascii_dir="${script_dir%/*}/ascii/distro" @@ -3565,18 +3556,9 @@ get_full_path() { } get_default_config() { - if [[ -f "/etc/neofetch/config" ]]; then - default_config="/etc/neofetch/config" - - elif [[ -f "/usr/local/etc/neofetch/config" ]]; then - default_config="/usr/local/etc/neofetch/config" - - 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 "/boot/home/config/non-packaged/etc/neofetch/config" ]]; then - default_config="/boot/home/config/non-packaged/etc/neofetch/config" - + # Note: CONFDIR here is a placeholder -- it will be replaced with your configuration directory. + if [[ -f "CONFDIR/config" ]]; then + default_config="CONFDIR/config" else [[ -z "$script_dir" ]] && script_dir="$(get_full_path "$0")" default_config="${script_dir%/*}/config/config" @@ -3604,12 +3586,8 @@ get_user_config() { if [[ -f "${XDG_CONFIG_HOME}/neofetch/config" ]]; then config_file="${XDG_CONFIG_HOME}/neofetch/config" - elif [[ -f "/etc/neofetch/config" ]]; then - cp "/etc/neofetch/config" "${XDG_CONFIG_HOME}/neofetch" - config_file="${XDG_CONFIG_HOME}/neofetch/config" - - elif [[ -f "/usr/local/etc/neofetch/config" ]]; then - cp "/usr/local/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch" + elif [[ -f "CONFDIR/config" ]]; then + cp "CONFDIR/config" "${XDG_CONFIG_HOME}/neofetch" config_file="${XDG_CONFIG_HOME}/neofetch/config" else From 8665cbb4eb4c1338a4ff018e304411c0cb2f3e5d Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 20 Jun 2017 18:28:19 +0700 Subject: [PATCH 280/308] Misc: Different behaviors if PREFIX is empty --- install.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 99a7baa9..1daf9901 100755 --- a/install.sh +++ b/install.sh @@ -12,10 +12,16 @@ while [[ "$1" ]]; do shift done -[[ -z "$BINDIR" ]] && BINDIR="/usr/bin" +if [[ -z "$PREFIX" ]]; then + [[ -z "$BINDIR" ]] && BINDIR="/usr/bin" + [[ -z "$ASCIIDIR" ]] && ASCIIDIR="/usr/share/neofetch/ascii/distro" + [[ -z "$MANDIR" ]] && MANDIR="/usr/share/man/man1" +else + [[ -z "$BINDIR" ]] && BINDIR="/bin" + [[ -z "$ASCIIDIR" ]] && ASCIIDIR="/share/neofetch/ascii/distro" + [[ -z "$MANDIR" ]] && MANDIR="/share/man/man1" +fi [[ -z "$CONFDIR" ]] && CONFDIR="/etc/neofetch" -[[ -z "$ASCIIDIR" ]] && ASCIIDIR="/usr/share/neofetch/ascii/distro" -[[ -z "$MANDIR" ]] && MANDIR="/usr/share/man/man1" mkdir -p "${DESTDIR}""${PREFIX}""${BINDIR}" mkdir -p "${DESTDIR}""${PREFIX}""${CONFDIR}" From 29ae56d87abadfe28bde9ddbf0a08eccbc853386 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 20 Jun 2017 18:39:35 +0700 Subject: [PATCH 281/308] Misc: Delete the leading slash --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 1daf9901..9b9975cd 100755 --- a/install.sh +++ b/install.sh @@ -28,8 +28,8 @@ mkdir -p "${DESTDIR}""${PREFIX}""${CONFDIR}" mkdir -p "${DESTDIR}""${PREFIX}""${ASCIIDIR}" mkdir -p "${DESTDIR}""${PREFIX}""${MANDIR}" -sed -i -e "s|CONFDIR|/${PREFIX}${CONFDIR}|g" neofetch -sed -i -e "s|ASCIIDIR|/${PREFIX}${ASCIIDIR}|g" neofetch +sed -i -e "s|CONFDIR|${PREFIX}${CONFDIR}|g" neofetch +sed -i -e "s|ASCIIDIR|${PREFIX}${ASCIIDIR}|g" neofetch cp -p neofetch "${DESTDIR}""${PREFIX}""${BINDIR}" cp -p config/config "${DESTDIR}""${PREFIX}""${CONFDIR}" From 38f0ac6a84ca77846340831359f7099739c97902 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 20 Jun 2017 20:37:32 +0700 Subject: [PATCH 282/308] 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 283/308] 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 284/308] 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 285/308] 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 286/308] 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 287/308] 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 288/308] 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 289/308] 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 290/308] 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 291/308] 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 292/308] 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 293/308] 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 294/308] 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 295/308] 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 062dbcda9ab588cd74bc9583b5676494e74c8069 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 24 Jun 2017 23:44:55 +0700 Subject: [PATCH 296/308] Installscript: Use POSIX-compliant sh instead of bash --- install.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 9b9975cd..ed2af281 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ -#!/usr/bin/env bash +#!/bin/sh -while [[ "$1" ]]; do +while [ "$1" ]; do case "$1" in "--destdir") DESTDIR="$2" ;; "--bindir") BINDIR="$2" ;; @@ -12,16 +12,16 @@ while [[ "$1" ]]; do shift done -if [[ -z "$PREFIX" ]]; then - [[ -z "$BINDIR" ]] && BINDIR="/usr/bin" - [[ -z "$ASCIIDIR" ]] && ASCIIDIR="/usr/share/neofetch/ascii/distro" - [[ -z "$MANDIR" ]] && MANDIR="/usr/share/man/man1" +if [ -z "$PREFIX" ]; then + [ -z "$BINDIR" ] && BINDIR="/usr/bin" + [ -z "$ASCIIDIR" ] && ASCIIDIR="/usr/share/neofetch/ascii/distro" + [ -z "$MANDIR" ] && MANDIR="/usr/share/man/man1" else - [[ -z "$BINDIR" ]] && BINDIR="/bin" - [[ -z "$ASCIIDIR" ]] && ASCIIDIR="/share/neofetch/ascii/distro" - [[ -z "$MANDIR" ]] && MANDIR="/share/man/man1" + [ -z "$BINDIR" ] && BINDIR="/bin" + [ -z "$ASCIIDIR" ] && ASCIIDIR="/share/neofetch/ascii/distro" + [ -z "$MANDIR" ] && MANDIR="/share/man/man1" fi -[[ -z "$CONFDIR" ]] && CONFDIR="/etc/neofetch" +[ -z "$CONFDIR" ] && CONFDIR="/etc/neofetch" mkdir -p "${DESTDIR}""${PREFIX}""${BINDIR}" mkdir -p "${DESTDIR}""${PREFIX}""${CONFDIR}" From ca78d52d5fcc9cd8da9755a27aacadda9783aefd Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 28 Jun 2017 02:00:14 +0700 Subject: [PATCH 297/308] Misc: Remove comments --- neofetch | 2 -- 1 file changed, 2 deletions(-) diff --git a/neofetch b/neofetch index 1627499f..d11b4461 100755 --- a/neofetch +++ b/neofetch @@ -2171,7 +2171,6 @@ get_ascii() { [[ "$image_source" =~ \.(png|jpg|jpe|jpeg|gif)$ ]] && \ err "Image: Source is image file but ascii backend was selected. Using distro ascii." - # Note: ASCIIDIR here is a placeholder -- it will be replaced with your ASCII directory. if [[ -d "ASCIIDIR" ]]; then ascii_dir="ASCIIDIR" else @@ -3556,7 +3555,6 @@ get_full_path() { } get_default_config() { - # Note: CONFDIR here is a placeholder -- it will be replaced with your configuration directory. if [[ -f "CONFDIR/config" ]]; then default_config="CONFDIR/config" else From d57806c95fed4b6c460b2cfb0624b10169e22584 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 28 Jun 2017 06:38:05 +0700 Subject: [PATCH 298/308] 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 299/308] 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 300/308] 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 301/308] 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 302/308] 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 303/308] 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 304/308] 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 305/308] 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 From a31a445e9f2f12343ea5e9e6e629c85a9d480770 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 1 Jul 2017 17:19:38 +0700 Subject: [PATCH 306/308] Installscript: Update with latest config filename --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index ed2af281..7f8fded5 100755 --- a/install.sh +++ b/install.sh @@ -32,6 +32,6 @@ sed -i -e "s|CONFDIR|${PREFIX}${CONFDIR}|g" neofetch sed -i -e "s|ASCIIDIR|${PREFIX}${ASCIIDIR}|g" neofetch cp -p neofetch "${DESTDIR}""${PREFIX}""${BINDIR}" -cp -p config/config "${DESTDIR}""${PREFIX}""${CONFDIR}" +cp -p config/config.conf "${DESTDIR}""${PREFIX}""${CONFDIR}" cp -p ascii/distro/* "${DESTDIR}""${PREFIX}""${ASCIIDIR}" cp -p neofetch.1 "${DESTDIR}""${PREFIX}""${MANDIR}" From 2392b2c8c951756a12bcc90128252cef67b0920f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 1 Jul 2017 20:58:02 +1000 Subject: [PATCH 307/308] docs: CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c21a0895..74fc6c04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ ## Contributors +## General + +- Config file now has a `.conf` suffix. + + ## Info **CPU** From 2eca41ddf26f4076448ce8e2a8882b6b9b864d4a Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 1 Jul 2017 18:08:39 +0700 Subject: [PATCH 308/308] Docs: CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 74fc6c04..390807d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ## General - Config file now has a `.conf` suffix. - +- Neofetch now assumes target directories (config file and ASCII directory) at install time, this fixes problems with systems such as NixOS. ## Info