From c7c500605fb723f6354f738defc9eda6093b8615 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 5 Jul 2017 14:03:35 +1000 Subject: [PATCH 001/177] docs: update license. --- LICENSE.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index f18a25f1..0954e90f 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,5 +1,3 @@ -The MIT License (MIT) - Copyright (c) 2016-2017 Dylan Araps Permission is hereby granted, free of charge, to any person obtaining a copy From 1b541037625b2052d1206248dcf7ec10340073c5 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 5 Jul 2017 14:04:09 +1000 Subject: [PATCH 002/177] docs: update license --- LICENSE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LICENSE.md b/LICENSE.md index 0954e90f..f18a25f1 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,3 +1,5 @@ +The MIT License (MIT) + Copyright (c) 2016-2017 Dylan Araps Permission is hereby granted, free of charge, to any person obtaining a copy From c8204e4c016b623e84fd3f84a366e9de6871d03b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 5 Jul 2017 14:24:02 +1000 Subject: [PATCH 003/177] docs: Add back missing clause to license. --- LICENSE.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LICENSE.md b/LICENSE.md index f18a25f1..851d9f6a 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -9,6 +9,9 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE From c290bcaaa5ee538e77f39a356adcbd783be062a4 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 9 Jul 2017 01:55:02 +0700 Subject: [PATCH 004/177] Misc: Add back missing clause of license into program and manpage --- neofetch | 3 +++ neofetch.1 | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 596383b1..669b5274 100755 --- a/neofetch +++ b/neofetch @@ -4129,6 +4129,9 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/neofetch.1 b/neofetch.1 index 96dc4344..7b47fc4a 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.1-git" "User Commands" +.TH NEOFETCH "1" "July 2017" "Neofetch 3.2.1-git" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS @@ -334,6 +334,9 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: .PP +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +.PP THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE From 8b3b0be709ac2fc1aa2de55145cc099f9dca2e20 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 9 Jul 2017 17:57:53 +0700 Subject: [PATCH 005/177] Misc: Shellcheck fix SC2188 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 669b5274..043ec1ac 100755 --- a/neofetch +++ b/neofetch @@ -2585,7 +2585,7 @@ display_image() { # appearing in specific terminal emulators. 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." + "${w3m_img_path:-false}" -bg "$background_color" >/dev/null 2>&1 || to_off "Image: w3m-img failed to display the image." zws="\xE2\x80\x8B\x20" ;; From e9f491656e2a0a2c93eb5f18395253a91f4e11f3 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 10 Jul 2017 00:08:15 +1000 Subject: [PATCH 006/177] tests: fix tests. --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 043ec1ac..aaa24717 100755 --- a/neofetch +++ b/neofetch @@ -1891,7 +1891,7 @@ get_disk() { IFS="$old_ifs" # Stop here if 'df' fails to print disk info. - [[ -z "${disks[@]}" ]] && \ + [[ -z "${disks[*]}" ]] && \ { err "Disk: df failed to print the disks, make sure the disk_show array is set properly."; return; } for disk in "${disks[@]}"; do @@ -4150,7 +4150,7 @@ exit 1 get_args() { # Check the commandline flags early for '--config'. - [[ "$@" != *--config* ]] && get_user_config 2>/dev/null + [[ "$*" != *--config* ]] && get_user_config 2>/dev/null while [[ "$1" ]]; do case "$1" in From 76d6fefeea93acaca4d81e1f28e54f06e3c1659e Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 9 Jul 2017 16:36:04 +0700 Subject: [PATCH 007/177] Uptime [AIX/IRIX]: Remove leading zeroes from output From bash(1): > Constants with a leading 0 are interpreted as octal numbers. A > leading 0x or 0X denote hexadecimal. This causes error in uptime calculation. --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index aaa24717..ba537bd0 100755 --- a/neofetch +++ b/neofetch @@ -395,6 +395,7 @@ get_uptime() { d="0" h="0" case "$t" in *"-"*) d="${t%%-*}"; t="${t#*-}";; esac case "$t" in *":"*":"*) h="${t%%:*}"; t="${t#*:}";; esac + h="${h#0}" t="${t#0}" seconds="$((d*86400 + h*3600 + ${t%%:*}*60 + ${t#*:}))" ;; esac From 033bb23774bab623d92d6afa664c736b7901990b Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 10 Jul 2017 18:32:45 +0700 Subject: [PATCH 008/177] Misc: Add back Makefile and remove install script --- Makefile | 28 ++++++++++++++++++++++++++++ install.sh | 37 ------------------------------------- 2 files changed, 28 insertions(+), 37 deletions(-) create mode 100644 Makefile delete mode 100755 install.sh diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..2d6885e4 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +PREFIX = /usr +SYSCONFDIR = /etc + +all: + @echo Run \'make install\' to install Neofetch. + +install: + @echo 'Making directories...' + @mkdir -p $(DESTDIR)$(PREFIX)/bin + @mkdir -p $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro + @mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 + @mkdir -p $(DESTDIR)$(SYSCONFDIR)/neofetch + + @echo 'Installing binaries...' + @sed "s|ASCIIDIR|$(PREFIX)/share/neofetch/ascii/distro|g;s|CONFDIR|$(SYSCONFDIR)/neofetch|g" < neofetch > $(DESTDIR)$(PREFIX)/bin/neofetch + @chmod 755 $(DESTDIR)$(PREFIX)/bin/neofetch + + @echo 'Installing ASCII files, man page and config file...' + @cp -p ascii/distro/* $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro + @cp -p neofetch.1 $(DESTDIR)$(PREFIX)/share/man/man1 + @cp -p config/config.conf $(DESTDIR)$(SYSCONFDIR)/neofetch/config.conf + +uninstall: + @echo 'Removing files...' + @rm -rf $(DESTDIR)$(PREFIX)/bin/neofetch + @rm -rf $(DESTDIR)$(PREFIX)/share/man/man1/neofetch.1* + @rm -rf $(DESTDIR)$(PREFIX)/share/neofetch + @rm -rf $(DESTDIR)$(SYSCONFDIR)/neofetch diff --git a/install.sh b/install.sh deleted file mode 100755 index 7f8fded5..00000000 --- a/install.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -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 - -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" - -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.conf "${DESTDIR}""${PREFIX}""${CONFDIR}" -cp -p ascii/distro/* "${DESTDIR}""${PREFIX}""${ASCIIDIR}" -cp -p neofetch.1 "${DESTDIR}""${PREFIX}""${MANDIR}" From 688bcd6e5534ff8ef08aa72b60092ba32d48fc25 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 12 Jul 2017 11:32:37 +1000 Subject: [PATCH 009/177] resolution [linux]: Add support for orientation. --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index aaa24717..283b5938 100755 --- a/neofetch +++ b/neofetch @@ -1497,7 +1497,10 @@ get_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 ", "}')" ;; + "off") + resolution="$(xrandr --nograb --current | awk -F 'connected |+' '/ connected/ {printf $2 ", "}')" + resolution="${resolution/primary }" + ;; esac resolution="${resolution//\*}" From dfd08b4ce4adec586633042874489cb96ed0e8d8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 12 Jul 2017 15:04:16 +1000 Subject: [PATCH 010/177] distro: Added support for Sabotage Linux --- ascii/distro/sabotage | 12 ++++++++++++ neofetch | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 ascii/distro/sabotage diff --git a/ascii/distro/sabotage b/ascii/distro/sabotage new file mode 100644 index 00000000..d4490fc8 --- /dev/null +++ b/ascii/distro/sabotage @@ -0,0 +1,12 @@ + +${c2} .|'''.| | '||''|. ..|''|| + ||.. ' ||| || || .|' || + ''|||. | || ||'''|. || || +. '|| .''''|. || || '|. || +|'....|' .|. .||. .||...|' ''|...|' + +|''||''| | ..|'''.| '||''''| + || ||| .|' ' || . + || | || || .... ||''| + || .''''|. '|. || || + .||. .|. .||. ''|...'| .||.....| diff --git a/neofetch b/neofetch index b9e2b096..f795747a 100755 --- a/neofetch +++ b/neofetch @@ -3325,6 +3325,11 @@ get_distro_colors() { ascii_file="rosa" ;; + "sabotage"*) + set_colors 4 7 1 + ascii_file="sabotage" + ;; + "Sabayon"*) set_colors 4 7 1 ascii_file="sabayon" From d3ff43141c4a004d92999abbae273318479485fb Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 12 Jul 2017 15:04:48 +1000 Subject: [PATCH 011/177] docs: CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 390807d9..16cb2a43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ - 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. + +## Operating System + +- Added support for Sabotage Linux. + + ## Info **CPU** From 33256b2640fc1a1dad2fe3a717220ecedd9d9a01 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Wed, 12 Jul 2017 10:13:46 +0200 Subject: [PATCH 012/177] Theme: Fix detection on KDE Partial fix for #766 --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index f795747a..4a5758ca 100755 --- a/neofetch +++ b/neofetch @@ -1530,7 +1530,7 @@ get_style() { if [[ -f "${kde_config_dir}/kdeglobals" ]]; then kde_config_file="${kde_config_dir}/kdeglobals" - theme="$(grep "^[^#]*${kde}" "$kde_config_file")" + theme="$(grep "^${kde}" "$kde_config_file")" theme="${theme/${kde}*=}" theme="$(uppercase "$theme")" @@ -1648,7 +1648,7 @@ get_theme() { gsettings="gtk-theme" gconf="gtk_theme" xfconf="/Net/ThemeName" - kde="widgetStyle" + kde="Name" get_style } From 9f5ab665c93f3d2abd289f532f38cf0c774db6e7 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Wed, 12 Jul 2017 17:07:09 +0200 Subject: [PATCH 013/177] WM Theme [KDE]: Fix detection of Aurorae themes Aurorae themes were detected as kwin.aurorae because the name was taken from library= instead of theme= in kwinrc. #766 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 4a5758ca..8450bc4f 100755 --- a/neofetch +++ b/neofetch @@ -778,7 +778,7 @@ get_wm_theme() { kde_config_dir if [[ -f "${kde_config_dir}/kwinrc" ]]; then - wm_theme="$(awk '/theme=kwin4/{gsub(/theme=kwin4_decoration_qml_/,"",$0); print $0; exit}' "${kde_config_dir}/kwinrc")" + wm_theme="$(awk '/theme=/{gsub(/theme=.*_/,"",$0); print $0; exit}' "${kde_config_dir}/kwinrc")" [[ -z "$wm_theme" ]] && wm_theme="$(awk '/library=org.kde/{gsub(/library=org.kde./,"",$0); print $0; exit}' "${kde_config_dir}/kwinrc")" [[ -z "$wm_theme" ]] && wm_theme="$(awk '/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0); print $0; exit}' "${kde_config_dir}/kwinrc")" From 94b9b3ad0c8f06495528c2cef06900392ba4a49d Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Wed, 12 Jul 2017 19:49:00 +0200 Subject: [PATCH 014/177] WM Theme [KDE]: Fix Aurorae themes For themes with underscores in the name, only the last part was displayed. #766 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 8450bc4f..8fff62fe 100755 --- a/neofetch +++ b/neofetch @@ -778,7 +778,7 @@ get_wm_theme() { kde_config_dir if [[ -f "${kde_config_dir}/kwinrc" ]]; then - wm_theme="$(awk '/theme=/{gsub(/theme=.*_/,"",$0); print $0; exit}' "${kde_config_dir}/kwinrc")" + wm_theme="$(awk '/theme=/{gsub(/theme=.*qml_|theme=.*svg__/,"",$0); print $0; exit}' "${kde_config_dir}/kwinrc")" [[ -z "$wm_theme" ]] && wm_theme="$(awk '/library=org.kde/{gsub(/library=org.kde./,"",$0); print $0; exit}' "${kde_config_dir}/kwinrc")" [[ -z "$wm_theme" ]] && wm_theme="$(awk '/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0); print $0; exit}' "${kde_config_dir}/kwinrc")" From b95e03052592af7b20ec086044b2a074808e2137 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 13 Jul 2017 01:40:35 +0700 Subject: [PATCH 015/177] Distro: Put GoboLinux versioning below lsb_release lsb_release can handle GoboLinux properly, it seems. So the fallback detection can be used if lsb_release fails. --- neofetch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index f795747a..eaec39aa 100755 --- a/neofetch +++ b/neofetch @@ -71,12 +71,6 @@ get_distro() { *) distro="$(lsb_release -sd) on Chrome OS" ;; esac - elif [[ -f "/etc/GoboLinuxVersion" ]]; then - case "$distro_shorthand" in - "on" | "tiny") distro="GoboLinux" ;; - *) distro="GoboLinux $(< /etc/GoboLinuxVersion)" - esac - elif [[ -f "/etc/redstar-release" ]]; then case "$distro_shorthand" in "on" | "tiny") distro="Red Star OS" ;; @@ -91,6 +85,12 @@ get_distro() { esac distro="$(lsb_release $lsb_flags)" + elif [[ -f "/etc/GoboLinuxVersion" ]]; then + case "$distro_shorthand" in + "on" | "tiny") distro="GoboLinux" ;; + *) distro="GoboLinux $(< /etc/GoboLinuxVersion)" + esac + elif type -p guix >/dev/null; then case "$distro_shorthand" in "on" | "tiny") distro="GuixSD" ;; From c3c6404990c78a33dccd1d47b867a27048207b0b Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 13 Jul 2017 01:56:05 +0700 Subject: [PATCH 016/177] Docs: CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16cb2a43..fd8cc18d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ - [SSH] Fixed infinite loop if neofetch is run on non-interactive shells. +**Theme** + +- [Qt/KDE] Fixed inaccurate theme naming. + ## Images From 347854b296a3d8b6b2fb57d39f808a55b0ffd1c3 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 13 Jul 2017 18:27:53 +0700 Subject: [PATCH 017/177] CPU [NetBSD]: Added temp support --- CHANGELOG.md | 1 + neofetch | 4 ++-- neofetch.1 | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd8cc18d..75b2e76c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ **CPU** - [Linux] Fixed inaccurate output on ARM SoC devices. +- [NetBSD] Added support for CPU temperature. (NOTE: This only supports newer Intel processors) **Terminal** diff --git a/neofetch b/neofetch index 84b4b261..fb411502 100755 --- a/neofetch +++ b/neofetch @@ -934,7 +934,7 @@ get_cpu() { # Get CPU temp. if [[ "$cpu_temp" != "off" ]]; then case "$kernel_name" in - "FreeBSD"* | "DragonFly"*) + "FreeBSD"* | "DragonFly"* | "NetBSD"*) temp="$(sysctl -n dev.cpu.0.temperature)" temp="${temp/C}" ;; @@ -3968,7 +3968,7 @@ INFO: NOTE: This only works on Linux and BSD. - NOTE: For FreeBSD-based systems, you need to enable coretemp kernel module. + NOTE: For FreeBSD and NetBSD-based systems, you need to enable coretemp kernel module. This only supports newer Intel processors. --distro_shorthand on/off Shorten the output of distro (tiny, on, off) diff --git a/neofetch.1 b/neofetch.1 index 7b47fc4a..48b040ed 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -51,7 +51,7 @@ Hide/Show cpu temperature. .IP NOTE: This only works on Linux and BSD. .IP -NOTE: For FreeBSD\-based systems, you need to enable coretemp kernel module. +NOTE: For FreeBSD and NetBSD\-based systems, you need to enable coretemp kernel module. This only supports newer Intel processors. .TP \fB\-\-distro_shorthand\fR on/off Shorten the output of distro (tiny, on, off) From 63b26285fb5d9d008693e6e45e3696f217429b6a Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 13 Jul 2017 18:42:44 +0700 Subject: [PATCH 018/177] CPU: Fix inaccurate speed for processors below 1GHz --- neofetch | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/neofetch b/neofetch index fb411502..dc77bcc5 100755 --- a/neofetch +++ b/neofetch @@ -1014,18 +1014,13 @@ get_cpu() { esac 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}" + if (( speed < 1000 )); then + cpu="$cpu @ ${speed}MHz $temp" else + [[ "$speed_shorthand" == "on" ]] && speed="$((speed / 100))" speed="${speed:0:1}.${speed:1}" + cpu="$cpu @ ${speed}GHz $temp" fi - - cpu="$cpu @ ${speed}GHz $temp" fi # Remove un-needed patterns from cpu output. From 403e66e74e6f4f25d4de84f50e3038fe0d8a350e Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 13 Jul 2017 18:47:59 +0700 Subject: [PATCH 019/177] Misc: Update Config documentation --- config/config.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/config.conf b/config/config.conf index 1575de10..21470e2d 100644 --- a/config/config.conf +++ b/config/config.conf @@ -195,7 +195,9 @@ cpu_cores="logical" # Default: 'off' # Values: 'C', 'F', 'off' # Flag: --cpu_temp -# Supports: Linux +# Supports: Linux, BSD +# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable +# coretemp kernel module. This only supports newer Intel processors. # # Example: # C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]' From 2e338529b87e767138dddcf7fa808d9e0732dffb Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 13 Jul 2017 19:04:42 +0700 Subject: [PATCH 020/177] Docs: Update manpage and config --- config/config.conf | 1 + neofetch | 3 +++ neofetch.1 | 2 ++ 3 files changed, 6 insertions(+) diff --git a/config/config.conf b/config/config.conf index 1575de10..ab9867d5 100644 --- a/config/config.conf +++ b/config/config.conf @@ -142,6 +142,7 @@ speed_type="bios_limit" # Default: 'off' # Values: 'on', 'off'. # Flag: --speed_shorthand. +# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz # # Example: # on: 'i7-6500U (4) @ 3.1GHz' diff --git a/neofetch b/neofetch index dc77bcc5..aff94700 100755 --- a/neofetch +++ b/neofetch @@ -3951,6 +3951,9 @@ INFO: NOTE: This only supports Linux with cpufreq. --speed_shorthand on/off Whether or not to show decimals in CPU speed. + + NOTE: This flag is not supported in systems with CPU speed less than 1 GHz. + --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 diff --git a/neofetch.1 b/neofetch.1 index 48b040ed..60557487 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -32,6 +32,8 @@ NOTE: This only supports Linux with cpufreq. .TP \fB\-\-speed_shorthand\fR on/off Whether or not to show decimals in CPU speed. +.IP +NOTE: This flag is not supported in systems with CPU speed less than 1 GHz. .TP \fB\-\-cpu_shorthand\fR type Shorten the output of CPU From 8f975faa6b78ed62ad7f8c456d9001af71208e58 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 13 Jul 2017 19:06:15 +0700 Subject: [PATCH 021/177] Docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75b2e76c..a9ab9af9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - [Linux] Fixed inaccurate output on ARM SoC devices. - [NetBSD] Added support for CPU temperature. (NOTE: This only supports newer Intel processors) +- Fixed inaccurate speed output in systems with CPU speed less than 1 GHz. **Terminal** From 1378d3b33ed68c7791149e2025c79475ad62a9f3 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 14 Jul 2017 00:00:49 +0700 Subject: [PATCH 022/177] Docs: Attribution --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9ab9af9..48ec7a5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Contributors +**[@mstraube](https://github.com/mstraube)** + ## General @@ -26,8 +28,7 @@ **Theme** -- [Qt/KDE] Fixed inaccurate theme naming. - +- [Qt/KDE] Fixed inaccurate theme naming. **[@mstraube](https://github.com/mstraube)** ## Images From 2e1c942491ad8d34d64ee0b0d0677c95b4f076a0 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 14 Jul 2017 02:25:17 +0700 Subject: [PATCH 023/177] CPU [Speed]: Use the cpu_cores approach instead of deleting it manually. This way, we don't have to replace the "@" with "($cores) @" and remove the CPU speed from the output. --- neofetch | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/neofetch b/neofetch index aff94700..7d8c0240 100755 --- a/neofetch +++ b/neofetch @@ -1013,16 +1013,6 @@ get_cpu() { ;; esac - if [[ "$speed" ]]; then - if (( speed < 1000 )); then - cpu="$cpu @ ${speed}MHz $temp" - else - [[ "$speed_shorthand" == "on" ]] && speed="$((speed / 100))" - speed="${speed:0:1}.${speed:1}" - cpu="$cpu @ ${speed}GHz $temp" - fi - fi - # Remove un-needed patterns from cpu output. cpu="${cpu//(TM)}" cpu="${cpu//(tm)}" @@ -1047,11 +1037,18 @@ get_cpu() { # Add CPU cores to the output. [[ "$cpu_cores" != "off" && "$cores" ]] && \ - cpu="${cpu/@/(${cores}) @}" + cpu="$cpu ($cores)" - # Remove CPU speed from the output. - [[ "$cpu_speed" == "off" ]] && \ - cpu="${cpu/@ *GHz}" + # Add CPU speed to the output. + if [[ "$cpu_speed" != "off" && "$speed" ]]; then + if (( speed < 1000 )); then + cpu="$cpu @ ${speed}MHz $temp" + else + [[ "$speed_shorthand" == "on" ]] && speed="$((speed / 100))" + speed="${speed:0:1}.${speed:1}" + cpu="$cpu @ ${speed}GHz $temp" + fi + fi # Make the output of CPU shorter. case "$cpu_shorthand" in From 91372f1cdef67594005084161f73d794350d1873 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 14 Jul 2017 02:36:07 +0700 Subject: [PATCH 024/177] CPU [Linux]: Add fallback speed method for PowerPC systems. --- CHANGELOG.md | 1 + neofetch | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48ec7a5f..4173e6c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ **CPU** - [Linux] Fixed inaccurate output on ARM SoC devices. +- [Linux] Fixed CPU speed not appearing on PowerPC systems. - [NetBSD] Added support for CPU temperature. (NOTE: This only supports newer Intel processors) - Fixed inaccurate speed output in systems with CPU speed less than 1 GHz. diff --git a/neofetch b/neofetch index 7d8c0240..e0574c2c 100755 --- a/neofetch +++ b/neofetch @@ -859,7 +859,8 @@ get_cpu() { speed="$((speed / 1000))" else - speed="$(awk -F ': |\\.' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo)" + speed="$(awk -F ': |\\.' '/cpu MHz|^clock/ {printf $2; exit}' /proc/cpuinfo)" + speed="${speed/MHz}" fi # Get CPU temp. From 44f1afcff6ffe2f433a601b16057d4bf962ad0a7 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 14 Jul 2017 09:07:39 +1000 Subject: [PATCH 025/177] DE: Fix incorrect DE name, closes #772 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index aff94700..cc485823 100755 --- a/neofetch +++ b/neofetch @@ -621,7 +621,7 @@ get_de() { de="${de/Budgie:GNOME/Budgie}" elif [[ "$DESKTOP_SESSION" ]]; then - de="${DESKTOP_SESSION/ *}" + de="${DESKTOP_SESSION##*/}" elif [[ "$GNOME_DESKTOP_SESSION_ID" ]]; then de="GNOME" From 139617e293ee67f5e4dfe10b21ad0f8c54e07e1f Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 14 Jul 2017 02:40:15 +0700 Subject: [PATCH 026/177] Docs: CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48ec7a5f..ae3e412d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ - [NetBSD] Added support for CPU temperature. (NOTE: This only supports newer Intel processors) - Fixed inaccurate speed output in systems with CPU speed less than 1 GHz. +**Uptime** + +- [AIX/IRIX] Fixed Neofetch crashing when calculating uptime. + **Terminal** - [SSH] Fixed infinite loop if neofetch is run on non-interactive shells. @@ -30,6 +34,7 @@ - [Qt/KDE] Fixed inaccurate theme naming. **[@mstraube](https://github.com/mstraube)** + ## Images - Fixed division by 0 error in XTerm. From a503fb975cbf0bd3ac1da76ecde68114e24d4bce Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 14 Jul 2017 13:53:09 +0700 Subject: [PATCH 027/177] CPU: Deprecate cpu_shorthand in favor of cpu_brand --- CHANGELOG.md | 1 + config/config.conf | 17 +++++++---------- neofetch | 31 +++++++++++++------------------ neofetch.1 | 5 ++--- 4 files changed, 23 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4173e6c2..9142d682 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - [Linux] Fixed CPU speed not appearing on PowerPC systems. - [NetBSD] Added support for CPU temperature. (NOTE: This only supports newer Intel processors) - Fixed inaccurate speed output in systems with CPU speed less than 1 GHz. +- Deprecated `cpu_shorthand` in favor of `cpu_brand`. **Terminal** diff --git a/config/config.conf b/config/config.conf index 5c87b439..33b3cf82 100644 --- a/config/config.conf +++ b/config/config.conf @@ -149,19 +149,16 @@ speed_type="bios_limit" # off: 'i7-6500U (4) @ 3.100GHz' speed_shorthand="off" -# Shorten the output of the CPU function +# Enable/Disable CPU brand in output. # -# Default: 'off' -# Values: 'on', 'off', 'tiny', 'name', 'speed' -# Flag: --cpu_shorthand +# Default: 'on' +# Values: 'on', 'off' +# Flag: --cpu_brand # # Example: -# on: 'i7-6500U (4) @ 3.1GHz' -# off: 'Intel i7-6500U (4) @ 3.1GHz' -# tiny: 'i7-6500U (4)' -# name: 'Intel i7-6500U (4)' -# speed: '3.1GHz' -cpu_shorthand="off" +# on: 'Intel i7-6500U' +# off: 'i7-6500U (4)' +cpu_brand="on" # CPU Speed # Hide/Show CPU speed. diff --git a/neofetch b/neofetch index e0574c2c..bbf653b4 100755 --- a/neofetch +++ b/neofetch @@ -1036,6 +1036,14 @@ get_cpu() { # Trim spaces from core output cores="${cores//[[:space:]]}" + # Remove CPU brand from the output. + if [[ "$cpu_brand" == "off" ]]; then + cpu="${cpu/AMD }" + cpu="${cpu/Intel }" + cpu="${cpu/Core? Duo }" + cpu="${cpu/Qualcomm }" + fi + # Add CPU cores to the output. [[ "$cpu_cores" != "off" && "$cores" ]] && \ cpu="$cpu ($cores)" @@ -1050,21 +1058,6 @@ get_cpu() { cpu="$cpu @ ${speed}GHz $temp" fi fi - - # Make the output of CPU shorter. - case "$cpu_shorthand" in - "name") cpu="${cpu/@*}" ;; - "speed") cpu="${cpu#*@ }" ;; - - "on" | "tiny") - cpu="${cpu/AMD }" - cpu="${cpu/Intel }" - cpu="${cpu/Core? Duo }" - cpu="${cpu/Qualcomm }" - - [[ "$cpu_shorthand" == "tiny" ]] && cpu="${cpu/@*}" - ;; - esac } get_cpu_usage() { @@ -3799,6 +3792,9 @@ old_options() { # Scrot dir was removed in 3.1.0. [[ -n "$scrot_dir" ]] && scrot_dir= + + # cpu_shorthand was deprecated in 3.3.0 + [[ -n "$cpu_shorthand" ]] && { err "Config: \$cpu_shorthand is deprecated, use \$cpu_brand, \$cpu_cores, and \$cpu_speed instead."; } } cache_uname() { @@ -3952,8 +3948,7 @@ INFO: NOTE: This flag is not supported in systems with CPU speed less than 1 GHz. - --cpu_shorthand type Shorten the output of CPU - Possible values: name, speed, tiny, on, off + --cpu_brand on/off Enable/Disable CPU brand in output. --cpu_cores type Whether or not to display the number of CPU cores Possible values: logical, physical, off @@ -4168,7 +4163,7 @@ get_args() { "--distro_shorthand") distro_shorthand="$2" ;; "--kernel_shorthand") kernel_shorthand="$2" ;; "--uptime_shorthand") uptime_shorthand="$2" ;; - "--cpu_shorthand") cpu_shorthand="$2" ;; + "--cpu_brand") cpu_brand="$2" ;; "--gpu_brand") gpu_brand="$2" ;; "--gpu_type") gpu_type="$2" ;; "--refresh_rate") refresh_rate="$2" ;; diff --git a/neofetch.1 b/neofetch.1 index 60557487..71c699b0 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -35,9 +35,8 @@ Whether or not to show decimals in CPU speed. .IP NOTE: This flag is not supported in systems with CPU speed less than 1 GHz. .TP -\fB\-\-cpu_shorthand\fR type -Shorten the output of CPU -Possible values: name, speed, tiny, on, off +\fB\-\-cpu_brand\fR on/off +Enable/Disable CPU brand in output. .TP \fB\-\-cpu_cores\fR type Whether or not to display the number of CPU cores From 17cb578611a2bad99fcc24d48b93dc987d46cfd0 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 14 Jul 2017 12:03:01 +0200 Subject: [PATCH 028/177] WM: Fix/add Window Maker detection --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index f0419257..ee65e4c2 100755 --- a/neofetch +++ b/neofetch @@ -663,11 +663,14 @@ get_wm() { if [[ -n "$DISPLAY" && "$os" != "Mac OS X" ]]; then id="$(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}')" - wm="$(xprop -id "$id" -notype -f _NET_WM_NAME 8t)" + wm="$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)" wm="${wm/*_NET_WM_NAME = }" wm="${wm/\"}" wm="${wm/\"*}" + # Window Maker does not set _NET_WM_NAME + [[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker" + # Fallback for Wayland wms. [[ "$wm" == "xwlc" ]] && \ wm="$(ps -e | grep -m 1 -o -F -e "sway" -e "orbment" -e "velox" -e "orbital")" From 4c9e720cce652db860c34a6044d64db86f910dbb Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 14 Jul 2017 21:37:13 +1000 Subject: [PATCH 029/177] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a906f516..379afd2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,9 @@ - [Qt/KDE] Fixed inaccurate theme naming. **[@mstraube](https://github.com/mstraube)** +**Window Manager** + +- Fix incorrect output when using WindowMaker. **[@mstraube](https://github.com/mstraube)** ## Images From 61a959069304f3d30480bd76370dbcd62f0506ec Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 14 Jul 2017 14:45:19 +0200 Subject: [PATCH 030/177] General: Get rid of a call to awk --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index ee65e4c2..8fcd8710 100755 --- a/neofetch +++ b/neofetch @@ -662,7 +662,8 @@ get_wm() { ((wm_run == 1)) && return if [[ -n "$DISPLAY" && "$os" != "Mac OS X" ]]; then - id="$(xprop -root -notype | awk '$1=="_NET_SUPPORTING_WM_CHECK:"{print $5}')" + id="$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)" + id="${id##* }" wm="$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t)" wm="${wm/*_NET_WM_NAME = }" wm="${wm/\"}" From 7a90486916ea1a0ca1c4de95f46127c5e00948fb Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 14 Jul 2017 15:29:53 +0200 Subject: [PATCH 031/177] General: Remove another awk call --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 8fcd8710..f8b0bb3f 100755 --- a/neofetch +++ b/neofetch @@ -2402,7 +2402,8 @@ get_term_size() { current_window="$(xdpyinfo | grep -E -o "focus:.*0x[0-9a-f]+")" current_window="${current_window/*window }" elif type -p xprop >/dev/null 2>&1; then - current_window="$(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}')" + current_window="$(xprop -root _NET_ACTIVE_WINDOW)" + current_window="${current_window##* }" fi # If the ID was found get the window size. From 082c53e57e26fa20aaab85e9a2a083bbd8f3da12 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 15 Jul 2017 15:16:41 +0200 Subject: [PATCH 032/177] Song: Add support for Pogo --- neofetch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index f8b0bb3f..f9e6671e 100755 --- a/neofetch +++ b/neofetch @@ -1336,7 +1336,7 @@ get_memory() { get_song() { # This is absurdly long. - 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}')" + 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|pogo/ {printf $5 " " $6; exit}')" get_song_dbus() { # Multiple players use an almost identical dbus command to get the information. @@ -1416,6 +1416,11 @@ get_song() { awk -F'"' '/artist/ {getline; a=$2} /title/ {getline; t=$2} END{print a " - " t}')" ;; + "pogo"*) + song="$(dbus-send --print-reply --dest=org.mpris.pogo /Player org.freedesktop.MediaPlayer.GetMetadata | + awk -F'"' '/string "artist"/ {getline; a=$2} /string "title"/ {getline; t=$2} END{print a " - " t}')" + ;; + *) mpc >/dev/null 2>&1 && song="$(mpc current)" ;; From 70b7816b6ca8d1778bd92aa0db21042b69519a29 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 15 Jul 2017 15:27:11 +0200 Subject: [PATCH 033/177] Term: Add font support for LXTerminal --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index f9e6671e..17c6b429 100755 --- a/neofetch +++ b/neofetch @@ -1793,6 +1793,10 @@ get_term_font() { [[ "$profile_filename" ]] && term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")" ;; + "lxterminal"*) + term_font="$(awk -F '=' '/fontname=/ {print $2; exit}' "${XDG_CONFIG_HOME}/lxterminal/lxterminal.conf")" + ;; + "mate-terminal") # To get the actual config we have to create a temporarily file with the --save-config option. mateterm_config="/tmp/mateterm.cfg" From 99438ec16b642060e536ef9f1e07066ebce643f2 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 15 Jul 2017 16:36:45 +0200 Subject: [PATCH 034/177] Term: Fix xfce4-terminal when using system-font --- neofetch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 17c6b429..895dbe43 100755 --- a/neofetch +++ b/neofetch @@ -1868,7 +1868,14 @@ get_term_font() { ;; "xfce4-terminal") - term_font="$(awk -F '=' '/^FontName/ {a=$2} END{print a}' "${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")" + term_font="$(awk -F '=' '/^FontName/ {a=$2} /^FontUseSystem=TRUE/ {a=$0} END{print a}' "${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")" + + if [[ "$term_font" == "FontUseSystem=TRUE" ]]; then + term_font="$(gsettings get org.gnome.desktop.interface monospace-font-name)" + term_font="$(trim_quotes "$term_font")" + fi + # TODO: Figure out how to get the fallback font when not using system-font + # and no font is set in the config file. ;; esac } From 2fb963fcb827cebf15571b25ac0dfbda4da643b5 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 15 Jul 2017 17:32:42 +0200 Subject: [PATCH 035/177] Term: Simplify Hyper font detection --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 895dbe43..4ba90936 100755 --- a/neofetch +++ b/neofetch @@ -1767,7 +1767,8 @@ get_term_font() { ;; "Hyper"*) - term_font="$(awk -F "," '/fontFamily/ {a=$1} END{print a}' "${HOME}/.hyper.js" | awk -F "'" '{a=$2} END{print a}')" + term_font="$(awk -F':|,' '/fontFamily/ {print $2; exit}' "${HOME}/.hyper.js")" + term_font="$(trim_quotes "$term_font")" ;; "konsole"*) From 9596b0b921c278ebe86509bb40ec39f870008d07 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 15 Jul 2017 17:39:22 +0200 Subject: [PATCH 036/177] General: Exit awk early --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 4ba90936..7b9369df 100755 --- a/neofetch +++ b/neofetch @@ -1837,7 +1837,7 @@ get_term_font() { ;; "sakura"*) - term_font="$(awk -F '=' '/^font=/ {a=$2} END{print a}' "${XDG_CONFIG_HOME}/sakura/sakura.conf")" + term_font="$(awk -F '=' '/^font=/ {print $2; exit}' "${XDG_CONFIG_HOME}/sakura/sakura.conf")" ;; "terminology") From b6b6083d2b65c30a3fcc14345b9ccaa0278093e1 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 15 Jul 2017 20:29:19 +0200 Subject: [PATCH 037/177] Term: Add xfce4-terminal fallback font --- neofetch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 7b9369df..054c4f26 100755 --- a/neofetch +++ b/neofetch @@ -1875,8 +1875,9 @@ get_term_font() { term_font="$(gsettings get org.gnome.desktop.interface monospace-font-name)" term_font="$(trim_quotes "$term_font")" fi - # TODO: Figure out how to get the fallback font when not using system-font - # and no font is set in the config file. + + # Default fallback font hardcoded in terminal-preferences.c + [[ -z "$term_font" ]] && term_font="Monospace 12" ;; esac } From 4cf8f5e989a6e38831266f7a7e20ba6f38611c06 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 16 Jul 2017 09:32:40 +1000 Subject: [PATCH 038/177] docs: CHANGELOG --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 379afd2e..f10608ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,11 @@ - [SSH] Fixed infinite loop if neofetch is run on non-interactive shells. +**Terminal Font** + +- Added support for LXTerminal. **[@mstraube](https://github.com/mstraube)** +- Fixed Xfce4-terminal font output when system-wide font is used. **[@mstraube](https://github.com/mstraube)** + **Theme** - [Qt/KDE] Fixed inaccurate theme naming. **[@mstraube](https://github.com/mstraube)** @@ -40,6 +45,10 @@ - Fix incorrect output when using WindowMaker. **[@mstraube](https://github.com/mstraube)** +**Song** + +- Added support for Pogo. **[@mstraube](https://github.com/mstraube)** + ## Images - Fixed division by 0 error in XTerm. From 40c4a7748b1ba5815714a92112fac98181f24f70 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 16 Jul 2017 09:34:43 +1000 Subject: [PATCH 039/177] os: Fix bug where ChromeOS would be incorrectly detected. Closes #770 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 054c4f26..44564cee 100755 --- a/neofetch +++ b/neofetch @@ -64,7 +64,7 @@ get_distro() { *) distro="$(lsb_release -sd) on Windows 10" ;; esac - elif [[ "$(< /proc/version)" == *"cros"* || -f "/dev/cros_ec" ]]; then + elif [[ "$(< /proc/version)" == *"chrome-bot"* || -f "/dev/cros_ec" ]]; then case "$distro_shorthand" in "on") distro="$(lsb_release -sir) [Chrome OS]" ;; "tiny") distro="Chrome OS" ;; From 75b347b7d87a680ebb3bbe52a94e6449a6c5e684 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 16 Jul 2017 09:36:12 +1000 Subject: [PATCH 040/177] docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f10608ef..a3cf9f9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ## Operating System - Added support for Sabotage Linux. +- Fixed Raspbian being detected as ChromeOS. ## Info From e305140e8d82949a8a8cb874eb0c1e6fafb70cf4 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 16 Jul 2017 16:46:12 +0700 Subject: [PATCH 041/177] Distro [BSD]: Use -m instead of -p --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 44564cee..c181879f 100755 --- a/neofetch +++ b/neofetch @@ -222,7 +222,7 @@ get_distro() { # Get OS architecture. case "$os" in - "Solaris" | "AIX" | "BSD" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;; + "Solaris" | "AIX" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;; *) machine_arch="$(uname -m)" ;; esac From 60bdea15bb9341a9cf00a336d609be584eac922a Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 16 Jul 2017 16:48:19 +0700 Subject: [PATCH 042/177] CPU: Remove unneeded output for AMD --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index c181879f..4d1b4680 100755 --- a/neofetch +++ b/neofetch @@ -1031,6 +1031,7 @@ get_cpu() { cpu="${cpu//Eight-Core}" cpu="${cpu//, * Compute Cores}" cpu="${cpu//Core}" + cpu="${cpu//(\"AuthenticAMD\"*)}" cpu="${cpu//with Radeon * Graphics}" cpu="${cpu//, altivec supported}" cpu="${cpu//FPU*}" From 44444ae0cc80c733c3b36a1c634e7024e901cf31 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sun, 16 Jul 2017 20:02:43 +0200 Subject: [PATCH 043/177] OS: Add support for Parsix --- ascii/distro/parsix | 21 +++++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 ascii/distro/parsix diff --git a/ascii/distro/parsix b/ascii/distro/parsix new file mode 100644 index 00000000..2753a461 --- /dev/null +++ b/ascii/distro/parsix @@ -0,0 +1,21 @@ + ${c2}-/+/:. + ${c2}.syssssys. + ${c1}.--. ${c2}ssssssssso${c1} ..--. + :++++++: ${c2}+ssssssss+${c1} ./++/+++: + /+++++++++.${c2}.yssooooy`${c1}-+///////o- + /++++++++++.${c2}+soooos:${c1}:+////////+- + :+++++////o-${c2}oooooo-${c1}+/////////- + `-/++//++-${c4}.-----.-${c1}:+/////:- + ${c3}-://::--${c1}-:/:${c4}.--.````.--.${c1}:::-${c3}--::::::. +${c3}-/:::::::://:${c4}.:-` `-:${c3}`:/:::::::--/- +${c3}/::::::::::/-${c4}--. .-.${c3}-/://///::::/ +${c3}-/:::::::::/:${c4}`:-. .-:${c3}`:///////////- + `${c3}-::::--${c1}.-://.${c4}---....---${c1}`:+/:-${c3}--::::-` + ${c1}-/+///+o/-${c4}.----.${c1}.:oo+++o+. + ${c1}-+/////+++o:${c2}syyyyy.${c1}o+++++++++: + ${c1}.+////+++++-${c2}+sssssy+${c1}.++++++++++\ + ${c1}.+:/++++++.${c2}.yssssssy-${c1}`+++++++++: + ${c1}:/+++++- ${c2}+sssssssss ${c1}-++++++- + ${c1}`--` ${c2}+sssssssso ${c1}`--` + ${c2}+sssssy+` + ${c2}`.::-` diff --git a/neofetch b/neofetch index 4d1b4680..c8c37228 100755 --- a/neofetch +++ b/neofetch @@ -3285,6 +3285,11 @@ get_distro_colors() { ascii_file="parrot" ;; + "Parsix"*) + set_colors 3 1 7 8 + ascii_file="parsix" + ;; + "PCBSD"* | "TrueOS"*) set_colors 1 7 3 ascii_file="trueos" From d6697845f6a5ec14e74b2c84334f2ed1f9b23e9d Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 17 Jul 2017 11:04:51 +0700 Subject: [PATCH 044/177] Docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3cf9f9b..28c3dc89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ## Operating System - Added support for Sabotage Linux. +- Added support for Parsix GNU/Linux. - Fixed Raspbian being detected as ChromeOS. From c4c6afeaf10915ed19b6c3517641580a5bcb6f53 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 17 Jul 2017 16:24:20 +0700 Subject: [PATCH 045/177] Docs: Attribution --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28c3dc89..3644dbcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ ## Operating System - Added support for Sabotage Linux. -- Added support for Parsix GNU/Linux. +- Added support for Parsix GNU/Linux. **[@mstraube](https://github.com/mstraube)** - Fixed Raspbian being detected as ChromeOS. From b811d521a19c41c088f86c6ba65a8894dcb64d87 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 18 Jul 2017 14:31:46 +0700 Subject: [PATCH 046/177] Install Date [Convert Time]: Remove leading zero from output The leading zero in some ls output caused bash to interpret the output as octal numbers, leading to the "value too great for base" error like the AIX/IRIX uptime. --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index c8c37228..cee79ba9 100755 --- a/neofetch +++ b/neofetch @@ -3838,7 +3838,7 @@ cache_uname() { convert_time() { # Convert ls timestamp to 'Tue 06 Dec 2016 4:58 PM' format. year="$1" - day="$3" + day="${3#0}" # Split time into hours/minutes. hour="${4/:*}" From 1dee216fb5f9a47ed4bf1ffdc7165aa4302213f7 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 18 Jul 2017 19:27:59 +0700 Subject: [PATCH 047/177] Misc: Remove all 2>/dev/null instances and put it into one single exec --- neofetch | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/neofetch b/neofetch index cee79ba9..bc60eeba 100755 --- a/neofetch +++ b/neofetch @@ -116,7 +116,7 @@ get_distro() { elif [[ -f "/etc/os-release" || -f "/usr/lib/os-release" ]]; then # Source the os-release file for file in /etc/os-release /usr/lib/os-release; do - source "$file" 2>/dev/null && break + source "$file" && break done # Format the distro name. @@ -1737,11 +1737,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")" + profiles_count="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist | 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)" + profile_name="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist)" if [[ "$profile_name" == "$current_profile_name" ]]; then # "Normal Font" @@ -1899,7 +1899,7 @@ get_disk() { # Create an array called 'disks' where each element is a separate line from # df's output. We then unset the first element which removes the column titles. IFS=$'\n' - disks=($(df "${df_flags[@]}" "${disk_show[@]:-/}" 2>/dev/null)) + disks=($(df "${df_flags[@]}" "${disk_show[@]:-/}")) unset 'disks[0]' IFS="$old_ifs" @@ -2188,7 +2188,7 @@ image_backend() { get_image_size make_thumbnail - display_image 2>/dev/null + display_image ;; *) @@ -2234,7 +2234,7 @@ get_ascii() { export LC_ALL="$sys_locale" # Turn file into variable. - while IFS=$'\n' read -r line 2>/dev/null; do + while IFS=$'\n' read -r line; do print+="$line \n" # Calculate size of ascii file in line length / line count. @@ -2263,7 +2263,7 @@ get_ascii() { get_image_source() { case "$image_source" in "auto" | "wall" | "wallpaper") - get_wallpaper 2>/dev/null + get_wallpaper ;; *) @@ -2614,7 +2614,7 @@ to_ascii() { image_backend="ascii" # Print the ascii art. - get_ascii 2>/dev/null + get_ascii # Set cursor position next image/ascii. printf "%b" "\033[${lines:-0}A\033[9999999D" @@ -2630,7 +2630,7 @@ to_off() { # SCREENSHOT take_scrot() { - scrot_program "${scrot_dir}${scrot_name}" 2>/dev/null + scrot_program "${scrot_dir}${scrot_name}" err "Scrot: Saved screenshot as: ${scrot_dir}${scrot_name}" @@ -2746,7 +2746,7 @@ info() { unset -v prin # Call the function. - "get_${2:-$1}" 2>/dev/null + "get_${2:-$1}" # If the get_func function called 'prin' directly, stop here. [[ "$prin" ]] && return @@ -4179,7 +4179,7 @@ exit 1 get_args() { # Check the commandline flags early for '--config'. - [[ "$*" != *--config* ]] && get_user_config 2>/dev/null + [[ "$*" != *--config* ]] && get_user_config while [[ "$1" ]]; do case "$1" in @@ -4344,7 +4344,7 @@ get_args() { "none" | "off" | "") ;; *) config_file="$(get_full_path "$2")" - get_user_config 2>/dev/null + get_user_config ;; esac ;; @@ -4362,9 +4362,10 @@ get_args() { main() { cache_uname get_os - get_default_config 2>/dev/null + get_default_config get_args "$@" - get_distro 2>/dev/null + [[ "$verbose" != "on" ]] && exec 2>/dev/null + get_distro get_bold get_distro_colors @@ -4380,12 +4381,12 @@ main() { image_backend old_functions get_cache_dir - print_info 2>/dev/null + print_info dynamic_prompt # w3m-img: Draw the image a second time to fix # rendering issues in specific terminal emulators. - [[ "$image_backend" == *w3m* ]] && display_image 2>/dev/null + [[ "$image_backend" == *w3m* ]] && display_image # Take a screenshot. [[ "$scrot" == "on" ]] && take_scrot From 8aeb0e4fb192c86d8ec2a25cd675a6173376b43d Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 19 Jul 2017 23:13:07 +0700 Subject: [PATCH 048/177] Resolution: Fix awk error when not using GNU awk Fixes #781 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index bc60eeba..6ef60e80 100755 --- a/neofetch +++ b/neofetch @@ -1495,7 +1495,7 @@ get_resolution() { 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 -F 'connected |+' '/ connected/ {printf $2 ", "}')" + resolution="$(xrandr --nograb --current | awk -F 'connected |\\+' '/ connected/ {printf $2 ", "}')" resolution="${resolution/primary }" ;; esac From 9c5dbcdfd61b399a414b42e5802d133a93bf96cf Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 20 Jul 2017 19:38:56 +0700 Subject: [PATCH 049/177] CPU: Strip spaces from speed output --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 6ef60e80..e81a65ab 100755 --- a/neofetch +++ b/neofetch @@ -1038,8 +1038,9 @@ get_cpu() { cpu="${cpu//Chip Revision*}" cpu="${cpu//Technologies, Inc}" - # Trim spaces from core output + # Trim spaces from core and speed output cores="${cores//[[:space:]]}" + speed="${speed//[[:space:]]}" # Remove CPU brand from the output. if [[ "$cpu_brand" == "off" ]]; then From 92b68e506e3ffd4cda53abf3ec35246b4b48e670 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 20 Jul 2017 22:39:06 +0700 Subject: [PATCH 050/177] CPU: Separate Mac CPU cores addition Well, at least now I know why the CPU cores were added that way. --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index e81a65ab..a0b47881 100755 --- a/neofetch +++ b/neofetch @@ -1052,7 +1052,10 @@ get_cpu() { # Add CPU cores to the output. [[ "$cpu_cores" != "off" && "$cores" ]] && \ - cpu="$cpu ($cores)" + case "$os" in + "Mac OS X") cpu="${cpu/@/(${cores}) @}" ;; + *) cpu="$cpu ($cores)" ;; + esac # Add CPU speed to the output. if [[ "$cpu_speed" != "off" && "$speed" ]]; then From 46c195c60f7602d151f79411b836c9223811db77 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 21 Jul 2017 20:53:24 +1000 Subject: [PATCH 051/177] OS: Added support for Amazon Linux AMI --- ascii/distro/amazon | 19 +++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 ascii/distro/amazon diff --git a/ascii/distro/amazon b/ascii/distro/amazon new file mode 100644 index 00000000..050c5b3a --- /dev/null +++ b/ascii/distro/amazon @@ -0,0 +1,19 @@ +${c1} `-/oydNNdyo:.` + `.:+shmMMMMMMMMMMMMMMmhs+:.` + -+hNNMMMMMMMMMMMMMMMMMMMMMMNNho- +.`` -/+shmNNMMMMMMNNmhs+/- ``. +dNmhs+:. `.:/oo/:.` .:+shmNd +dMMMMMMMNdhs+:.. ..:+shdNMMMMMMMd +dMMMMMMMMMMMMMMNds odNMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +dMMMMMMMMMMMMMMMMh yMMMMMMMMMMMMMMMMd +.:+ydNMMMMMMMMMMMh yMMMMMMMMMMMNdy+:. + `.:+shNMMMMMh yMMMMMNhs+:`` + `-+shy shs+:` diff --git a/neofetch b/neofetch index a0b47881..89de7599 100755 --- a/neofetch +++ b/neofetch @@ -2893,6 +2893,11 @@ get_distro_colors() { ascii_file="alpine" ;; + "Amazon"*) + set_colors 3 7 + ascii_file="amazon" + ;; + "Android"*) set_colors 2 7 ascii_file="android" From 992215116216fc7fa6eb82d0d35583b40271ddac Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 21 Jul 2017 20:54:02 +1000 Subject: [PATCH 052/177] docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3644dbcb..2ed49262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ## Operating System +- Added support for Amazon Linux AMI. - Added support for Sabotage Linux. - Added support for Parsix GNU/Linux. **[@mstraube](https://github.com/mstraube)** - Fixed Raspbian being detected as ChromeOS. From 7c814877bcfc9393d717c525989c6d8536cea665 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 22 Jul 2017 12:33:36 +1000 Subject: [PATCH 053/177] ascii: Update amazon --- ascii/distro/amazon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ascii/distro/amazon b/ascii/distro/amazon index 050c5b3a..3d107456 100644 --- a/ascii/distro/amazon +++ b/ascii/distro/amazon @@ -1,4 +1,4 @@ -${c1} `-/oydNNdyo:.` + `-/oydNNdyo:.` `.:+shmMMMMMMMMMMMMMMmhs+:.` -+hNNMMMMMMMMMMMMMMMMMMMMMMNNho- .`` -/+shmNNMMMMMMNNmhs+/- ``. From 0a49b84bccc94d240a8e3984ca7e691cdbd58a02 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 22 Jul 2017 12:34:12 +1000 Subject: [PATCH 054/177] os : Added support for Source Mage. --- ascii/distro/source_mage | 21 +++++++++++++++++++++ neofetch | 8 ++++++++ 2 files changed, 29 insertions(+) create mode 100644 ascii/distro/source_mage diff --git a/ascii/distro/source_mage b/ascii/distro/source_mage new file mode 100644 index 00000000..39a440e8 --- /dev/null +++ b/ascii/distro/source_mage @@ -0,0 +1,21 @@ +${c2} :ymNMNho. +.+sdmNMMMMMMMMMMy` +.-::/yMMMMMMMMMMMm- + sMMMMMMMMMMMm/ + /NMMMMMMMMMMMMMm: + .MMMMMMMMMMMMMMMMM: + `MMMMMMMMMMMMMMMMMN. + NMMMMMMMMMMMMMMMMMd + mMMMMMMMMMMMMMMMMMMo + hhMMMMMMMMMMMMMMMMMM. + .`/MMMMMMMMMMMMMMMMMs + :mMMMMMMMMMMMMMMMN` + `sMMMMMMMMMMMMMMM+ + /NMMMMMMMMMMMMMN` + oMMMMMMMMMMMMM+ + ./sd.-hMMMMMMMMmmN` + ./+oyyyh- `MMMMMMMMMmNh + sMMMMMMMMMmmo + `NMMMMMMMMMd: + -dMMMMMMMMMo + -shmNMMms. diff --git a/neofetch b/neofetch index 89de7599..17ae9184 100755 --- a/neofetch +++ b/neofetch @@ -517,6 +517,9 @@ get_packages() { type -p tazpkg >/dev/null && \ packages="$((packages+=$(tazpkg list | wc -l) - 6))" + type -p sorcery >/dev/null && \ + packages="$((packages+=$(gaze installed | wc -l)))" + if type -p pkg >/dev/null; then case "$kernel_name" in "FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;; @@ -3394,6 +3397,11 @@ get_distro_colors() { ascii_file="solus" ;; + "Source Mage"*) + set_colors 4 7 1 + ascii_file="source_mage" + ;; + "Sparky"*) set_colors 1 7 ascii_file="sparky" From df87f8535bfa311db02365a848342792356f81f8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 22 Jul 2017 12:37:20 +1000 Subject: [PATCH 055/177] ascii: Update amazon --- ascii/distro/amazon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ascii/distro/amazon b/ascii/distro/amazon index 3d107456..050c5b3a 100644 --- a/ascii/distro/amazon +++ b/ascii/distro/amazon @@ -1,4 +1,4 @@ - `-/oydNNdyo:.` +${c1} `-/oydNNdyo:.` `.:+shmMMMMMMMMMMMMMMmhs+:.` -+hNNMMMMMMMMMMMMMMMMMMMMMMNNho- .`` -/+shmNNMMMMMMNNmhs+/- ``. From 5726e741194561b651e5de2440803f44d927197c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 22 Jul 2017 12:53:53 +1000 Subject: [PATCH 056/177] docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ed49262..e7fc8225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Added support for Amazon Linux AMI. - Added support for Sabotage Linux. +- Added support for Source Mage. - Added support for Parsix GNU/Linux. **[@mstraube](https://github.com/mstraube)** - Fixed Raspbian being detected as ChromeOS. From b058193ce2fcf8741852fc05e53c1e52105cb7e5 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 22 Jul 2017 21:09:18 +0700 Subject: [PATCH 057/177] ASCII: Add freebsd_small --- ascii/distro/freebsd_small | 7 +++++++ neofetch | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 ascii/distro/freebsd_small diff --git a/ascii/distro/freebsd_small b/ascii/distro/freebsd_small new file mode 100644 index 00000000..943c147e --- /dev/null +++ b/ascii/distro/freebsd_small @@ -0,0 +1,7 @@ +${c1} /\\ _____ /\\ + \\_) (_/ + / \ +| | +| | + \ / + --_____-- diff --git a/neofetch b/neofetch index 17ae9184..cb6d79af 100755 --- a/neofetch +++ b/neofetch @@ -3067,6 +3067,11 @@ get_distro_colors() { ascii_file="fedora" ;; + "freebsd_small") + set_colors 1 7 3 + ascii_file="freebsd_small" + ;; + "FreeBSD"*) set_colors 1 7 3 ascii_file="freebsd" From ab1f72e42984a1043eddeec30c98e54473d811f3 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 22 Jul 2017 21:20:33 +0700 Subject: [PATCH 058/177] ASCII: Add debian_small --- ascii/distro/debian_small | 6 ++++++ neofetch | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 ascii/distro/debian_small diff --git a/ascii/distro/debian_small b/ascii/distro/debian_small new file mode 100644 index 00000000..64cbb56c --- /dev/null +++ b/ascii/distro/debian_small @@ -0,0 +1,6 @@ + ${c1}_____ + / __ \\ +| / | +| \\___- +-_ + --_ diff --git a/neofetch b/neofetch index cb6d79af..60f091d1 100755 --- a/neofetch +++ b/neofetch @@ -3022,6 +3022,11 @@ get_distro_colors() { ascii_file="crux" ;; + "debian_small") + set_colors 1 7 3 + ascii_file="debian_small" + ;; + "Debian"*) set_colors 1 7 3 ascii_file="debian" From de108fec2be6af017e2c8308963f36c03ae049dd Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 22 Jul 2017 21:33:46 +0700 Subject: [PATCH 059/177] ASCII: Add nixos_small --- ascii/distro/nixos_small | 7 +++++++ neofetch | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 ascii/distro/nixos_small diff --git a/ascii/distro/nixos_small b/ascii/distro/nixos_small new file mode 100644 index 00000000..0917ff8e --- /dev/null +++ b/ascii/distro/nixos_small @@ -0,0 +1,7 @@ + ${c1}\\\\ \\\\ // + ==\\\\__\\\\/ // + // \\\\// +==// //== + //\\\\___// +// /\\\\ \\\\== + // \\\\ \\\\ diff --git a/neofetch b/neofetch index 60f091d1..a99c3290 100755 --- a/neofetch +++ b/neofetch @@ -3242,6 +3242,11 @@ get_distro_colors() { ascii_file="nitrux" ;; + "nixos_small") + set_colors 4 6 + ascii_file="nixos_small" + ;; + "NixOS"*) set_colors 4 6 ascii_file="nixos" From bc549ce0755b993a46699446bd75dc52b228ff91 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 22 Jul 2017 21:48:27 +0700 Subject: [PATCH 060/177] ASCII: Add mac_small --- ascii/distro/mac_small | 8 ++++++++ neofetch | 5 +++++ 2 files changed, 13 insertions(+) create mode 100644 ascii/distro/mac_small diff --git a/ascii/distro/mac_small b/ascii/distro/mac_small new file mode 100644 index 00000000..24852ff1 --- /dev/null +++ b/ascii/distro/mac_small @@ -0,0 +1,8 @@ +${c1} .:' + _ :'_ +${c2} .'`_`-'_``. +:________.-' +${c3}:_______: +:_______: +${c4} :_______`-; +${c5} `._.-._.' diff --git a/neofetch b/neofetch index a99c3290..31c8011e 100755 --- a/neofetch +++ b/neofetch @@ -3187,6 +3187,11 @@ get_distro_colors() { ascii_file="lubuntu" ;; + "mac"*"_small") + set_colors 2 3 1 5 4 + ascii_file="mac_small" + ;; + "mac" | "Darwin") set_colors 2 3 1 1 5 4 ascii_file="mac" From 906e7cc4087f433612b51cc2fb83c54e38351c42 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sat, 22 Jul 2017 22:10:41 +0700 Subject: [PATCH 061/177] Docs: CHANGELOG and manpage --- CHANGELOG.md | 8 ++++++++ neofetch | 4 ++-- neofetch.1 | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7fc8225..5b5104ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,14 @@ - Fixed Raspbian being detected as ChromeOS. +## ASCII + +- Added small Debian. +- Added small FreeBSD. +- Added small macOS. +- Added small NixOS. + + ## Info **CPU** diff --git a/neofetch b/neofetch index 31c8011e..9df80069 100755 --- a/neofetch +++ b/neofetch @@ -4127,9 +4127,9 @@ ASCII: NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME', 'Ubuntu-Studio' or 'Ubuntu-Budgie' to use the flavors. - NOTE: Alpine, Arch, Crux, Gentoo, OpenBSD, and Void have a smaller logo variant. + NOTE: Alpine, Arch, CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, and Void have a smaller logo variant. - NOTE: Change this to 'alpine_small', 'arch_small', 'crux_small', 'gentoo_small', 'openbsd_small', and 'void_small' to use the small logos. + NOTE: Use '{distro name}_small' to use the small variants. --ascii_bold on/off Whether or not to bold the ascii logo. -L, --logo Hide the info text and only show the ascii logo. diff --git a/neofetch.1 b/neofetch.1 index 71c699b0..21e96bd8 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -235,9 +235,9 @@ NOTE: Ubuntu has flavor variants. .IP NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu\-GNOME', 'Ubuntu\-Studio' or 'Ubuntu\-Budgie' to use the flavors. .IP -NOTE: Alpine, Arch, Crux, Gentoo, OpenBSD, and Void have a smaller logo variant. +NOTE: Alpine, Arch, CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, and Void have a smaller logo variant. .IP -NOTE: Change this to 'alpine_small', 'arch_small', 'crux_small', 'gentoo_small', 'openbsd_small', and 'void_small' to use the small logos. +NOTE: Use '{distro name}_small' to use the small variants. .TP \fB\-\-ascii_bold\fR on/off Whether or not to bold the ascii logo. From fe9a379d8c60a2cedec1c64128addd7ab22c8c32 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 20 Jul 2017 22:34:48 +0700 Subject: [PATCH 062/177] CPU: Add CPU temp separately instead of embedding them in speed --- neofetch | 55 +++++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/neofetch b/neofetch index a0b47881..2308bcf4 100755 --- a/neofetch +++ b/neofetch @@ -868,15 +868,9 @@ get_cpu() { fi # Get CPU temp. - if [[ "$cpu_temp" != "off" && -f "$temp_dir" ]]; then + if [[ -f "$temp_dir" ]]; then temp="$(< "$temp_dir")" temp="$((temp * 100 / 10000))" - - # Convert to fahrenheit if enabled. - [[ "$cpu_temp" == "F" ]] && temp="$((temp * 90 / 50 + 320))" - - # Format the output. - temp="[${temp/${temp: -1}}.${temp: -1}°${cpu_temp:-C}]" fi # Get CPU cores. @@ -937,27 +931,16 @@ get_cpu() { cores="$(sysctl -n hw.ncpu)" # Get CPU temp. - if [[ "$cpu_temp" != "off" ]]; then - case "$kernel_name" in - "FreeBSD"* | "DragonFly"* | "NetBSD"*) - temp="$(sysctl -n dev.cpu.0.temperature)" - temp="${temp/C}" - ;; - "OpenBSD"* | "Bitrig"*) - temp="$(sysctl -n hw.sensors.lm0.temp0)" - temp="${temp/ degC}" - ;; - esac - - # Convert to fahrenheit if enabled. - if [[ "$cpu_temp" == "F" ]]; then - temp="${temp//.}" - temp="$((temp * 90 / 50 + 320))" - temp="[${temp/${temp: -1}}.${temp: -1}°F]" - else - temp="[${temp}°C]" - fi - fi + case "$kernel_name" in + "FreeBSD"* | "DragonFly"* | "NetBSD"*) + temp="$(sysctl -n dev.cpu.0.temperature)" + temp="${temp/C}" + ;; + "OpenBSD"* | "Bitrig"*) + temp="$(sysctl -n hw.sensors.lm0.temp0)" + temp="${temp/ degC}" + ;; + esac ;; "Solaris") @@ -1060,13 +1043,25 @@ get_cpu() { # Add CPU speed to the output. if [[ "$cpu_speed" != "off" && "$speed" ]]; then if (( speed < 1000 )); then - cpu="$cpu @ ${speed}MHz $temp" + cpu="$cpu @ ${speed}MHz" else [[ "$speed_shorthand" == "on" ]] && speed="$((speed / 100))" speed="${speed:0:1}.${speed:1}" - cpu="$cpu @ ${speed}GHz $temp" + cpu="$cpu @ ${speed}GHz" fi fi + + # Add CPU temp to the output. + if [[ "$cpu_temp" != "off" && "$temp" ]]; then + temp="${temp//.}" + + # Convert to Fahrenheit if enabled + [[ "$cpu_temp" == "F" ]] && temp="$((temp * 90 / 50 + 320))" + + # Format the output + temp="[${temp/${temp: -1}}.${temp: -1}°${cpu_temp:-C}]" + cpu="$cpu $temp" + fi } get_cpu_usage() { From 1d362254d916eab2239bd0b76c29d18bef65c05b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 24 Jul 2017 00:52:52 +1000 Subject: [PATCH 063/177] OS: Added support for Endless OS --- ascii/distro/endless | 21 +++++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 ascii/distro/endless diff --git a/ascii/distro/endless b/ascii/distro/endless new file mode 100644 index 00000000..fbff54b9 --- /dev/null +++ b/ascii/distro/endless @@ -0,0 +1,21 @@ +${c1} `:+yhmNMMMMNmhy+:` + -odMMNhso//////oshNMMdo- + /dMMh+. .+hMMd/ + /mMNo` `oNMm: + `yMMo` `oMMy` + `dMN- -NMd` + hMN. .NMh +/MM/ -os` /MM/ +dMm `smNmmhs/- `:sNMd+ `` mMd +MMy oMd--:+yMMMMMNo.:ohmMMMNy` yMM +MMy -NNyyhmMNh+oNMMMMMy:. dMo yMM +dMm `/++/-``/yNNh+/sdNMNddMm- mMd +/MM/ `dNy: `-::- /MM/ + hMN. .NMh + `dMN- -NMd` + `yMMo` `oMMy` + /mMNo` `oNMm/ + /dMMh+. .+hMMd/ + -odMMNhso//////oshNMMdo- + `:+yhmNMMMMNmhy+:` + diff --git a/neofetch b/neofetch index f26b8688..839b52eb 100755 --- a/neofetch +++ b/neofetch @@ -3057,6 +3057,11 @@ get_distro_colors() { ascii_file="elementary" ;; + "Endless"*) + set_colors 1 7 + ascii_file="endless" + ;; + "Exherbo"*) set_colors 4 7 1 ascii_file="exherbo" From 7222531b7d867df44fd122fd1bc04a384d6eb09e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 24 Jul 2017 00:53:39 +1000 Subject: [PATCH 064/177] docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b5104ea..471fce7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ## Operating System - Added support for Amazon Linux AMI. +- Added support for Endless OS. - Added support for Sabotage Linux. - Added support for Source Mage. - Added support for Parsix GNU/Linux. **[@mstraube](https://github.com/mstraube)** From 0a5a741e0011a4a51dadc868bab94e85f9c4a06d Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 25 Jul 2017 03:48:48 +0700 Subject: [PATCH 065/177] Image: Add path to NixOS w3m-img --- CHANGELOG.md | 5 +++++ neofetch | 3 +++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 471fce7e..399390f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,11 @@ - Fixed Raspbian being detected as ChromeOS. +## Images + +- [w3m] Fixed w3m-img not found on NixOS. + + ## ASCII - Added small Debian. diff --git a/neofetch b/neofetch index 839b52eb..b4ba2f49 100755 --- a/neofetch +++ b/neofetch @@ -2365,6 +2365,9 @@ get_w3m_img_path() { elif [[ -x "/usr/local/libexec/w3m/w3mimgdisplay" ]]; then w3m_img_path="/usr/local/libexec/w3m/w3mimgdisplay" + elif [[ -x "$HOME/.nix-profile/libexec/w3m/w3mimgdisplay" ]]; then + w3m_img_path="$HOME/.nix-profile/libexec/w3m/w3mimgdisplay" + else err "Image: w3m-img wasn't found on your system" fi From 5f395732433a6fbbb3bbfa434113d2ddb3de8568 Mon Sep 17 00:00:00 2001 From: Dominik Lohmann Date: Tue, 25 Jul 2017 13:56:06 +0200 Subject: [PATCH 066/177] Add support for chunkwm (macOS window manager) This PR adds support for chunkwm - https://github.com/koekeishiya/chunkwm --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index b4ba2f49..ab48d5f7 100755 --- a/neofetch +++ b/neofetch @@ -682,10 +682,11 @@ get_wm() { else case "$os" in "Mac OS X") - ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')" + ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hunkwm')" case "$ps_line" in *"kwm"*) wm="Kwm" ;; + *"chunkwm"*) wm="chunkwm" ;; *"Amethyst"*) wm="Amethyst" ;; *"Spectacle"*) wm="Spectacle" ;; *) wm="Quartz Compositor" ;; From db5c977ef99f1707de3a8b4c8613c2f770513a61 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 25 Jul 2017 23:00:45 +1000 Subject: [PATCH 067/177] docs: CHANGELOG --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 399390f2..3177e173 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Contributors -**[@mstraube](https://github.com/mstraube)** +- **[@mstraube](https://github.com/mstraube)** +- **[@dominiklohmann](https://github.com/dominiklohmann)** ## General @@ -61,6 +62,7 @@ **Window Manager** +- [macOS] Added support for `chunkwm`. **[@dominiklohmann](https://github.com/dominiklohmann)** - Fix incorrect output when using WindowMaker. **[@mstraube](https://github.com/mstraube)** **Song** From 03e2da715d43f9d8a158c04fca7386fd850ee961 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Wed, 26 Jul 2017 10:34:46 +0200 Subject: [PATCH 068/177] OS: Add support for AryaLinux --- ascii/distro/arya | 15 +++++++++++++++ neofetch | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 ascii/distro/arya diff --git a/ascii/distro/arya b/ascii/distro/arya new file mode 100644 index 00000000..7d603e20 --- /dev/null +++ b/ascii/distro/arya @@ -0,0 +1,15 @@ +${c1} `oyyy/${c2}-yyyyyy+ +${c1} -syyyy/${c2}-yyyyyy+ +${c1} .syyyyy/${c2}-yyyyyy+ +${c1} :yyyyyy/${c2}-yyyyyy+ +${c1} `/ :yyyyyy/${c2}-yyyyyy+ +${c1} .+s :yyyyyy/${c2}-yyyyyy+ +${c1} .oys :yyyyyy/${c2}-yyyyyy+ +${c1} -oyys :yyyyyy/${c2}-yyyyyy+ +${c1} :syyys :yyyyyy/${c2}-yyyyyy+ +${c1} /syyyys :yyyyyy/${c2}-yyyyyy+ +${c1} +yyyyyys :yyyyyy/${c2}-yyyyyy+ +${c1} .oyyyyyyo. :yyyyyy/${c2}-yyyyyy+ --------- +${c1} .syyyyyy+` :yyyyyy/${c2}-yyyyy+-+syyyyyyyy +${c1} -syyyyyy/ :yyyyyy/${c2}-yyys:.syyyyyyyyyy +${c1}:syyyyyy/ :yyyyyy/${c2}-yyo.:syyyyyyyyyyy diff --git a/neofetch b/neofetch index ab48d5f7..fcdd9cd2 100755 --- a/neofetch +++ b/neofetch @@ -520,6 +520,9 @@ get_packages() { type -p sorcery >/dev/null && \ packages="$((packages+=$(gaze installed | wc -l)))" + type -p alps >/dev/null && \ + packages="$((packages+=$(alps showinstalled | wc -l)))" + if type -p pkg >/dev/null; then case "$kernel_name" in "FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;; @@ -2956,6 +2959,11 @@ get_distro_colors() { ascii_file="arch" ;; + "Arya"*) + set_colors 2 1 + ascii_file="arya" + ;; + "Bitrig"*) set_colors 2 7 ascii_file="bitrig" From 9483a8941f4071f15c351cb2ff0b02326f703f7a Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 26 Jul 2017 19:10:33 +1000 Subject: [PATCH 069/177] docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3177e173..dabe1636 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ## Operating System +- Added support for AryaLinux. **[@mstraube](https://github.com/mstraube)** - Added support for Amazon Linux AMI. - Added support for Endless OS. - Added support for Sabotage Linux. From 3ccc42042ad2dac7ec06b967c8f1b17aa1cf3fce Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Wed, 26 Jul 2017 20:53:17 +0200 Subject: [PATCH 070/177] Term: Fix mate-terminal font when maximized or fullscreen --- neofetch | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index fcdd9cd2..a455c0b5 100755 --- a/neofetch +++ b/neofetch @@ -1814,13 +1814,12 @@ get_term_font() { mate-terminal --save-config="$mateterm_config" role="$(xprop -id "${WINDOWID}" WM_WINDOW_ROLE)" - role="${role##*= }" + role="${role##* }" + role="${role//\"}" - term_id="$(grep -A1 "${role//\"}" "$mateterm_config")" - term_id="${term_id##*=}" - - profile="$(grep -A1 "\[$term_id\]" "$mateterm_config")" - profile="${profile##*=}" + profile="$(awk -F '=' -v r="$role" \ + '$0~r {getline; if(/Maximized/) getline; if(/Fullscreen/) getline; id=$2"]"} + $0~id {if(id) {getline; print $2; exit}}' "$mateterm_config")" rm -f "$mateterm_config" From 071e00c650627128f4dc0ece2843b8b3a3ffe734 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 28 Jul 2017 12:08:07 +1000 Subject: [PATCH 071/177] ascii: Updated macOS ascii art. Closes #789 --- ascii/distro/mac | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/ascii/distro/mac b/ascii/distro/mac index 6dc4de69..3ca5ea31 100644 --- a/ascii/distro/mac +++ b/ascii/distro/mac @@ -1,16 +1,18 @@ -${c1} -/+:. - :++++. - /+++/. - .:-::- .+/:-``.::- - .:/++++++/::::/++++++/:` -${c2} .:///////////////////////:` - ////////////////////////` -${c3}-+++++++++++++++++++++++` -/++++++++++++++++++++++/ -${c4}/sssssssssssssssssssssss. -:ssssssssssssssssssssssss- -${c5} osssssssssssssssssssssssso/` - `syyyyyyyyyyyyyyyyyyyyyyyy+` -${c6} `ossssssssssssssssssssss/ - :ooooooooooooooooooo+. - `:+oo+/:-..-:/+o+/- +${c1} 'c. + ,xNMM. + .OMMMMo + OMMM0, + .;loddo:' loolloddol;. + cKMMMMMMMMMMNWMMMMMMMMMM0: +${c2} .KMMMMMMMMMMMMMMMMMMMMMMMWd. + XMMMMMMMMMMMMMMMMMMMMMMMX. +${c3};MMMMMMMMMMMMMMMMMMMMMMMM: +:MMMMMMMMMMMMMMMMMMMMMMMM: +${c4}.MMMMMMMMMMMMMMMMMMMMMMMMX. + kMMMMMMMMMMMMMMMMMMMMMMMMWd. + ${c5}.XMMMMMMMMMMMMMMMMMMMMMMMMMMk + .XMMMMMMMMMMMMMMMMMMMMMMMMK. + ${c6}kMMMMMMMMMMMMMMMMMMMMMMd + ;KMMMMMMMWXXWMMMMMMMk. + .cooc,. .,coo:. + From dc5a01f27d462fe446618ada4b2e9d840b363a2c Mon Sep 17 00:00:00 2001 From: Erin Kinsley Date: Fri, 28 Jul 2017 03:08:10 +0100 Subject: [PATCH 072/177] Prioritise maim(1) over scrot(1). If a user has maim(1) installed as well as scrot(1), they likely wish to use the former instead of the latter, as it is less commonly installed (and is even described as "supposed to be an improved scrot"). --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index a455c0b5..de136738 100755 --- a/neofetch +++ b/neofetch @@ -2702,12 +2702,12 @@ scrot_program() { if [[ "$scrot_cmd" != "auto" ]] && type -p "$scrot_cmd" >/dev/null; then scrot_program=("$scrot_cmd") - elif type -p scrot >/dev/null; then - scrot_program=(scrot) - elif type -p maim >/dev/null; then scrot_program=(maim) + elif type -p scrot >/dev/null; then + scrot_program=(scrot) + elif type -p import >/dev/null && [[ "$os" != "Mac OS X" ]]; then scrot_program=(import -window root) From 6cc08b5477ae4acf15968d01b998ce251a11459e Mon Sep 17 00:00:00 2001 From: dylan araps Date: Fri, 28 Jul 2017 21:54:58 +1000 Subject: [PATCH 073/177] image: Add support for all image formats that imagemagick supports. --- neofetch | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/neofetch b/neofetch index de136738..feaa0997 100755 --- a/neofetch +++ b/neofetch @@ -2277,7 +2277,7 @@ get_image_source() { if [[ -d "$image_source" ]]; then shopt -s nullglob - files=("${image_source%/}"/*.{png,jpg,jpeg,jpe,gif}) + files=("${image_source%/}"/*.{png,jpg,jpeg,jpe,gif,svg}) shopt -u nullglob image="${files[RANDOM % ${#files[@]}]}" @@ -2497,14 +2497,7 @@ get_image_size() { make_thumbnail() { # Name the thumbnail using variables so we can # use it later. - image_name="$crop_mode-$crop_offset-$width-$height" - - # Check to see if the image has a file extension, - # if it doesn't then add one. - case "${image##*/}" in - *"."*) image_name="${image_name}-${image##*/}" ;; - *) image_name="${image_name}-${image##*/}.jpg" ;; - esac + image_name="$crop_mode-$crop_offset-$width-$height-${image//\//_}.jpg" # Create the thumbnail dir if it doesn't exist. mkdir -p "$thumbnail_dir" From 41e48196582eccaa56c094f3b880d6f89ff64d5d Mon Sep 17 00:00:00 2001 From: dylan araps Date: Fri, 28 Jul 2017 22:14:26 +1000 Subject: [PATCH 074/177] image: Add support for transparency when using pdf or svg as input --- CHANGELOG.md | 2 ++ neofetch | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dabe1636..bbeb487a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ ## Images - [w3m] Fixed w3m-img not found on NixOS. +- Added support for using all image types as input. + - Neofetch now supports `svg`, `tiff` etc. ## ASCII diff --git a/neofetch b/neofetch index feaa0997..d0a4f5aa 100755 --- a/neofetch +++ b/neofetch @@ -2497,7 +2497,14 @@ get_image_size() { make_thumbnail() { # Name the thumbnail using variables so we can # use it later. - image_name="$crop_mode-$crop_offset-$width-$height-${image//\//_}.jpg" + image_name="$crop_mode-$crop_offset-$width-$height-${image//'/'/_}" + + # Handle file extensions. + case "${image##*.}" in + "eps"|"pdf"|"svg"|"gif"|"png") + image_name+=".png" ;; + *) image_name+=".jpg" ;; + esac # Create the thumbnail dir if it doesn't exist. mkdir -p "$thumbnail_dir" @@ -2523,6 +2530,7 @@ make_thumbnail() { -format "%[pixel:p{0,0}]" info:)" convert \ + -background none \ "$image" \ -trim +repage \ -gravity south \ @@ -2534,6 +2542,7 @@ make_thumbnail() { "fill") convert \ + -background none \ "$image" \ -trim +repage \ -scale "$width"x"$height"^ \ @@ -2544,6 +2553,7 @@ make_thumbnail() { "none") cp "$image" "$thumbnail_dir/$image_name" ;; *) convert \ + -background none \ "$image" \ -gravity "$crop_offset" \ -crop "$size"x"$size"+0+0 \ From 110e46bc6b0e4d43ac2f2cc946802b1659f92880 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 28 Jul 2017 15:54:14 +0200 Subject: [PATCH 075/177] Term: get_term(): ignore kdeinit, #791 --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index de136738..765ac308 100755 --- a/neofetch +++ b/neofetch @@ -1701,7 +1701,7 @@ get_term() { case "${name// }" in "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; - "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;; + "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"* | "kdeinit"*) break ;; "gnome-terminal-") term="gnome-terminal" ;; *"nvim") term="Neovim Terminal" ;; *"NeoVimServer"*) term="VimR Terminal" ;; From e52b01f2dc7079b74ae55ddcb19ca681de4641bc Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 31 Jul 2017 22:31:23 +1000 Subject: [PATCH 076/177] term: Fix errors if user disables terminal function. --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index a455c0b5..b8b546e6 100755 --- a/neofetch +++ b/neofetch @@ -1715,7 +1715,7 @@ get_term() { } get_term_font() { - ((term_run != 1)) && get_term + ((term_run != 1)) && get_term 2>/dev/null case "$term" in "alacritty"*) @@ -3782,7 +3782,7 @@ get_term_padding() { # # Note: This issue only seems to affect # URxvt. - ((term_run != 1)) && get_term + ((term_run != 1)) && get_term 2>/dev/null case "$term" in "URxvt"*) From 4e9f9af82047f2d9b45fca62b43d8abaf47be08f Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 1 Aug 2017 01:42:00 +1000 Subject: [PATCH 077/177] revert previous commit --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index 8ae648c3..5e36617c 100755 --- a/neofetch +++ b/neofetch @@ -1715,7 +1715,7 @@ get_term() { } get_term_font() { - ((term_run != 1)) && get_term 2>/dev/null + ((term_run != 1)) && get_term case "$term" in "alacritty"*) @@ -3785,7 +3785,7 @@ get_term_padding() { # # Note: This issue only seems to affect # URxvt. - ((term_run != 1)) && get_term 2>/dev/null + ((term_run != 1)) && get_term case "$term" in "URxvt"*) From eb62c843c9c1cb5d34b56f6636c92e73923f8738 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 1 Aug 2017 01:56:46 +1000 Subject: [PATCH 078/177] gpu: Hide duplicate identical gpus --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 5e36617c..d627a4c4 100755 --- a/neofetch +++ b/neofetch @@ -1113,7 +1113,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 '\\"|\\" \\"|\\(' '/"Display|"3D|"VGA/ {print $3 " " $4}' | uniq)) IFS="$old_ifs" # Number the GPUs if more than one exists. From e7168245e1dc263483f7c8bffa6b88f7b7149d73 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 1 Aug 2017 21:25:07 +1000 Subject: [PATCH 079/177] gpu: Correctly filter out duplicates --- neofetch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index d627a4c4..ec3001b5 100755 --- a/neofetch +++ b/neofetch @@ -1113,7 +1113,9 @@ get_gpu() { "Linux") # Read GPUs into array. IFS=$'\n' - gpus=($(lspci -mm | awk -F '\\"|\\" \\"|\\(' '/"Display|"3D|"VGA/ {print $3 " " $4}' | uniq)) + gpus=($(lspci -mm | awk -F '\\"|\\" \\"|\\(' \ + '/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END{for(i in a) + {if(!seen[a[i]]++) print a[i]}}')) IFS="$old_ifs" # Number the GPUs if more than one exists. From e9f6ffc2d9bd31af25c7cbf13c1dcce57886ad97 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 07:13:58 +1000 Subject: [PATCH 080/177] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbeb487a..eb8d4fa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,10 @@ - Fixed inaccurate speed output in systems with CPU speed less than 1 GHz. - Deprecated `cpu_shorthand` in favor of `cpu_brand`. +**GPU** + +- [Linux] Filter out duplicate entries. + **Uptime** - [AIX/IRIX] Fixed Neofetch crashing when calculating uptime. From ffd5bfcbd0d0898e17bffa8f7145d617325e9c23 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 11:12:34 +1000 Subject: [PATCH 081/177] general: Enforce 100 chars per line. --- neofetch | 182 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 120 insertions(+), 62 deletions(-) diff --git a/neofetch b/neofetch index 5e36617c..13c6f84e 100755 --- a/neofetch +++ b/neofetch @@ -57,7 +57,8 @@ get_distro() { case "$os" in "Linux" | "BSD" | "MINIX") - if [[ "$(< /proc/version)" == *"Microsoft"* || "$kernel_version" == *"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" ;; @@ -114,8 +115,10 @@ get_distro() { distro="Android $(getprop ro.build.version.release)" elif [[ -f "/etc/os-release" || -f "/usr/lib/os-release" ]]; then + files=("/etc/os-release" "/usr/lib/os-release") + # Source the os-release file - for file in /etc/os-release /usr/lib/os-release; do + for file in "${files[@]}"; do source "$file" && break done @@ -127,8 +130,8 @@ get_distro() { esac # Workarounds for distros that go against the os-release standard. - [[ -z "${distro// }" ]] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/os-release /usr/lib/os-release)" - [[ -z "${distro// }" ]] && distro="$(awk -F'=' '{print $2; exit}' /etc/os-release /usr/lib/os-release)" + [[ -z "${distro// }" ]] && distro="$(awk '/BLAG/ {print $1; exit}')" "${files[@]}" + [[ -z "${distro// }" ]] && distro="$(awk -F'=' '{print $2; exit}')" "${files[@]}" else for release_file in /etc/*-release; do @@ -145,7 +148,9 @@ get_distro() { # Workarounds for FreeBSD based distros. [[ -f "/etc/pcbsd-lang" ]] && distro="PCBSD" [[ -f "/etc/rc.conf.trueos" ]] && distro="TrueOS" - [[ -f "/etc/pacbsd-release" ]] && distro="PacBSD" # /etc/pacbsd-release is an empty file + + # /etc/pacbsd-release is an empty file + [[ -f "/etc/pacbsd-release" ]] && distro="PacBSD" fi fi distro="$(trim_quotes "$distro")" @@ -493,9 +498,6 @@ get_packages() { type -p pacman-g2 >/dev/null && \ packages="$((packages+=$(pacman-g2 -Q | wc -l)))" - type -p cave >/dev/null && \ - packages="$((packages+=$(ls -d -1 /var/db/paludis/repositories/cross-installed/*/data/* /var/db/paludis/repositories/installed/data/* | wc -l)))" - type -p lvu >/dev/null && \ packages="$((packages+=$(lvu installed | wc -l)))" @@ -523,6 +525,11 @@ get_packages() { type -p alps >/dev/null && \ packages="$((packages+=$(alps showinstalled | wc -l)))" + if type -p cave >/dev/null; then + package_dir=(/var/db/paludis/repositories/{cross-installed,installed}/*/data/*) + packages="$((packages+=$(ls -d -1 "${package_dir[@]}" | wc -l)))" + fi + if type -p pkg >/dev/null; then case "$kernel_name" in "FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;; @@ -697,7 +704,11 @@ get_wm() { ;; "Windows") - wm="$(tasklist | grep -m 1 -o -F -e "bugn" -e "Windawesome" -e "blackbox" -e "emerge" -e "litestep")" + wm="$(tasklist | grep -m 1 -o -F -e "bugn" \ + -e "Windawesome" \ + -e "blackbox" \ + -e "emerge" \ + -e "litestep")" [[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)" wm="${wm:+$wm, }Explorer" ;; @@ -713,8 +724,14 @@ get_wm_theme() { ((de_run != 1)) && get_de case "$wm" in - "E16") wm_theme="$(awk -F "= " '/theme.name/ {print $2}' "${HOME}/.e16/e_config--0.0.cfg")";; - "Sawfish") wm_theme="$(awk -F ")" '/\(quote default-frame-style/ {print $2}' "${HOME}/.sawfish/custom")" ;; + "E16") + wm_theme="$(awk -F "= " '/theme.name/ {print $2}' "${HOME}/.e16/e_config--0.0.cfg")" + ;; + + "Sawfish") + wm_theme="$(awk -F ")" '/\(quote default-frame-style/ {print $2}' \ + "${HOME}/.sawfish/custom")" + ;; "Cinnamon" | "Muffin" | "Mutter (Muffin)") detheme="$(gsettings get org.cinnamon.theme name)" @@ -748,7 +765,8 @@ get_wm_theme() { "E17" | "Enlightenment") if type -p eet >/dev/null; then - wm_theme="$(eet -d "${HOME}/.e/e/config/standard/e.cfg" config | awk '/value \"file\" string.*.edj/ {print $4}')" + wm_theme="$(eet -d "${HOME}/.e/e/config/standard/e.cfg" config | \ + awk '/value \"file\" string.*.edj/ {print $4}')" wm_theme="${wm_theme##*/}" wm_theme="${wm_theme%.*}" fi @@ -772,7 +790,8 @@ get_wm_theme() { ob_file="rc" fi - wm_theme="$(awk -F "[<,>]" '/]" '//dev/null 2>&1 && song="$(mpc current)" - ;; + *) mpc >/dev/null 2>&1 && song="$(mpc current)" ;; esac [[ "$(trim "$song")" == "-" ]] && unset -v song @@ -1457,10 +1507,12 @@ get_resolution() { resolution="${resolution//x??@/ @ }" else - resolution="$(system_profiler SPDisplaysDataType | awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')" + resolution="$(system_profiler SPDisplaysDataType |\ + awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')" fi - scale_factor="$(/usr/libexec/PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" /Library/Preferences/com.apple.windowserver.plist)" + scale_factor="$(/usr/libexec/PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" \ + /Library/Preferences/com.apple.windowserver.plist)" # If no refresh rate is empty. [[ "$resolution" == *"@ Hz"* ]] && \ @@ -1499,9 +1551,15 @@ get_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, "}')" ;; + "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 -F 'connected |\\+' '/ connected/ {printf $2 ", "}')" + resolution="$(xrandr --nograb --current | \ + awk -F 'connected |\\+' '/ connected/ {printf $2 ", "}')" resolution="${resolution/primary }" ;; esac From 72459ced1c3ae645a8a5ea7c1caeb5e7755e49a1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 11:33:29 +1000 Subject: [PATCH 082/177] general: Enforce 100 chars per line. --- neofetch | 143 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 97 insertions(+), 46 deletions(-) diff --git a/neofetch b/neofetch index 13c6f84e..99e4d568 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, /sbin, and /usr/etc to PATH. -export PATH="/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:${PATH}" +# Add more paths to $PATH. +export PATH="/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:/usr/libexec:${PATH}" # Set no case match. shopt -s nocasematch @@ -821,7 +821,7 @@ get_wm_theme() { ;; "Quartz Compositor") - wm_theme="$(/usr/libexec/PlistBuddy -c "Print AppleAquaColorVariant" \ + wm_theme="$(PlistBuddy -c "Print AppleAquaColorVariant" \ "${HOME}/Library/Preferences/.GlobalPreferences.plist")" if [[ -z "$wm_theme" ]] || ((wm_theme == 1)); then @@ -1511,7 +1511,7 @@ get_resolution() { awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')" fi - scale_factor="$(/usr/libexec/PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" \ + scale_factor="$(PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" \ /Library/Preferences/com.apple.windowserver.plist)" # If no refresh rate is empty. @@ -1759,7 +1759,9 @@ get_term() { case "${name// }" in "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;; - "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"* | "kdeinit"*) break ;; + "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"* | "kdeinit"*) + break + ;; "gnome-terminal-") term="gnome-terminal" ;; *"nvim") term="Neovim Terminal" ;; *"NeoVimServer"*) term="VimR Terminal" ;; @@ -1777,58 +1779,67 @@ get_term_font() { case "$term" in "alacritty"*) - term_font="$(awk -F ':|#' '/normal:/ {getline; print}' "${XDG_CONFIG_HOME}/alacritty/alacritty.yml")" + 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") - term_font="$(osascript -e 'tell application "Terminal" to font name of window frontmost')" + term_font="$(osascript -e 'tell application "Terminal" to + font name of window frontmost')" ;; "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! + # that identifies an active profile. There is the "id of current session of current win- + # dow" though, 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 current_profile_name - current_profile_name="$(osascript -e 'tell application "iTerm2" to profile name of current session of current window')" + local current_profile_name profiles_count profile_name diff_font none_ascii + + 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 profiles_count - profiles_count="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist | grep -c "Guid")" + profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" \ + "" |\ + grep -c "Guid")" + + font_file="${HOME}/Library/Preferences/com.googlecode.iterm2.plist" 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)" + profile_name="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" "$font_file")" 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)" + term_font="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Normal\ Font:" \ + "$font_file")" + # 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 use_different_font - use_different_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)" + diff_font="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Use\ Non-ASCII\ Font:" \ + "$font_file")" - 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)" + if [[ "$diff_font" == "true" ]]; then + non_ascii="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Non\ Ascii\ Font:" \ + "$font_file")" - [[ "$term_font" != "$non_ascii_font" ]] && \ - term_font="$term_font (normal) / $non_ascii_font (non-ascii)" + [[ "$term_font" != "$non_ascii" ]] && \ + term_font="$term_font (normal) / $non_ascii (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")" + term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' \ + "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")" ;; "Hyper"*) @@ -1844,9 +1855,11 @@ get_term_font() { for i in "${konsole_instances[@]}"; do konsole_sessions=($(qdbus "${i}" | grep '/Sessions/')) + # TODO: Swap to a while loop here. for session in "${konsole_sessions[@]}"; do if ((child == "$(qdbus "${i}" "${session}" processId)")); then - profile="$(qdbus "${i}" "${session}" environment | awk -F '=' '/KONSOLE_PROFILE_NAME/ {print $2}')" + profile="$(qdbus "${i}" "${session}" environment |\ + awk -F '=' '/KONSOLE_PROFILE_NAME/ {print $2}')" break fi done @@ -1856,15 +1869,18 @@ get_term_font() { # We could have two profile files for the same profile name, take first match profile_filename="$(grep -l "Name=${profile}" "${HOME}"/.local/share/konsole/*.profile)" profile_filename="${profile_filename/$'\n'*}" - [[ "$profile_filename" ]] && term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")" + [[ "$profile_filename" ]] && \ + term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")" ;; "lxterminal"*) - term_font="$(awk -F '=' '/fontname=/ {print $2; exit}' "${XDG_CONFIG_HOME}/lxterminal/lxterminal.conf")" + term_font="$(awk -F '=' '/fontname=/ {print $2; exit}' \ + "${XDG_CONFIG_HOME}/lxterminal/lxterminal.conf")" ;; "mate-terminal") - # To get the actual config we have to create a temporarily file with the --save-config option. + # 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. @@ -1876,11 +1892,13 @@ get_term_font() { role="${role//\"}" profile="$(awk -F '=' -v r="$role" \ - '$0~r {getline; if(/Maximized/) getline; if(/Fullscreen/) getline; id=$2"]"} + '$0~r {getline; if(/Maximized/) getline; + if(/Fullscreen/) getline; id=$2"]"} $0~id {if(id) {getline; print $2; exit}}' "$mateterm_config")" rm -f "$mateterm_config" + # TODO: Limit line length here. 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 @@ -1896,23 +1914,31 @@ get_term_font() { "pantheon"*) term_font="$(gsettings get org.pantheon.terminal.settings font)" - [[ -z "${term_font//\'}" ]] && term_font="$(gsettings get org.gnome.desktop.interface monospace-font-name)" + + [[ -z "${term_font//\'}" ]] && \ + term_font="$(gsettings get org.gnome.desktop.interface monospace-font-name)" + term_font="$(trim_quotes "$term_font")" ;; "sakura"*) - term_font="$(awk -F '=' '/^font=/ {print $2; exit}' "${XDG_CONFIG_HOME}/sakura/sakura.conf")" + term_font="$(awk -F '=' '/^font=/ {print $2; exit}' \ + "${XDG_CONFIG_HOME}/sakura/sakura.conf")" ;; "terminology") - term_font="$(strings "${XDG_CONFIG_HOME}/terminology/config/standard/base.cfg" | awk '/^font\.name$/{print a}{a=$0}')" + term_font="$(strings "${XDG_CONFIG_HOME}/terminology/config/standard/base.cfg" |\ + awk '/^font\.name$/{print a}{a=$0}')" term_font="${term_font/.pcf}" term_font="${term_font/:*}" ;; "termite") - [[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && termite_config="${XDG_CONFIG_HOME}/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")" + [[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && \ + termite_config="${XDG_CONFIG_HOME}/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") @@ -1933,7 +1959,8 @@ get_term_font() { ;; "xfce4-terminal") - term_font="$(awk -F '=' '/^FontName/ {a=$2} /^FontUseSystem=TRUE/ {a=$0} END{print a}' "${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")" + term_font="$(awk -F '=' '/^FontName/ {a=$2} /^FontUseSystem=TRUE/ {a=$0} END{print a}' \ + "${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")" if [[ "$term_font" == "FontUseSystem=TRUE" ]]; then term_font="$(gsettings get org.gnome.desktop.interface monospace-font-name)" @@ -1953,7 +1980,10 @@ get_disk() { # 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 + *"blocks"*) # Haiku + err "Your version of df cannot be used due to the non-standard flags" + return + ;; *"IMitv"*) df_flags=(-P -g) ;; # AIX *"befhikm"*) df_flags=(-P -k) ;; # IRIX *) df_flags=(-P -h) ;; @@ -1967,8 +1997,10 @@ get_disk() { IFS="$old_ifs" # Stop here if 'df' fails to print disk info. - [[ -z "${disks[*]}" ]] && \ - { err "Disk: df failed to print the disks, make sure the disk_show array is set properly."; return; } + if [[ -z "${disks[*]}" ]]; then + err "Disk: df failed to print the disks, make sure the disk_show array is set properly." + return + fi for disk in "${disks[@]}"; do # Create a second array and make each element split at whitespace this time. @@ -1976,7 +2008,9 @@ get_disk() { disk_perc="${disk_info[4]/'%'}" case "$df_version" in - *"befhikm"*) disk="$((disk_info[2]/1024/1024))G / $((disk_info[1]/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 @@ -2158,11 +2192,27 @@ get_install_date() { ls_prog="$(ls --version 2>&1)" case "$ls_prog" in - *"BusyBox"*) install_date="$(ls -tdce "$install_file" | awk '{printf $10 " " $7 " " $8 " " $9}')" ;; - *"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"* | *"RadC1xmnlog"*) err "Install Date doesn't work because your 'ls' does not support showing full date and time."; return ;; # AIX ls / IRIX ls + *"BusyBox"*) + install_date="$(ls -tdce "$install_file" | awk '{printf $10 " " $7 " " $8 " " $9}')" + ;; + + *"crtime"*) # xpg4 (Solaris) + install_date="$(ls -tdcE "$install_file" | awk '{printf $6 " " $7}')" + ;; + + *"ACFHLRSZ"*) # Toybox + install_date="$(ls -dl "$install_file" | awk '{printf $6 " " $7}')" + ;; + + *"GNU coreutils"*) + install_date="$(ls -tcd --full-time "$install_file" | awk '{printf $6 " " $7}')" + ;; + + *"ACFHLNRS"* | *"RadC1xmnlog"*) # AIX ls / IRIX ls + err "Install Date doesn't work because your 'ls' doesn't support full date/time." + return + ;; + *) install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')" ;; esac @@ -2256,7 +2306,8 @@ image_backend() { *) err "Image: Unknown image backend specified '$image_backend'." - err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', 'termpix', '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 ;; From 3a41c45b6131b53e7e6556f7ca4b131f2095e532 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 11:47:15 +1000 Subject: [PATCH 083/177] general: Enforce 100 chars per line. --- neofetch | 146 +++++++++++++++++++++++++++++++++++++---------------- neofetch.1 | 41 +++++++++------ 2 files changed, 127 insertions(+), 60 deletions(-) diff --git a/neofetch b/neofetch index 99e4d568..a18de264 100755 --- a/neofetch +++ b/neofetch @@ -2429,7 +2429,10 @@ get_wallpaper() { case "$de" in "MATE"*) image="$(gsettings get org.mate.background picture-filename)" ;; - "Xfce"*) image="$(xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace0/last-image)" ;; + "Xfce"*) + image="$(xfconf-query -c xfce4-desktop -p \ + "/backdrop/screen0/monitor0/workspace0/last-image")" + ;; "Cinnamon"*) image="$(gsettings get org.cinnamon.desktop.background picture-uri)" @@ -2441,7 +2444,8 @@ get_wallpaper() { image="$(awk -F\' '/feh/ {printf $2}' "${HOME}/.fehbg")" elif type -p nitrogen >/dev/null; then - image="$(awk -F'=' '/file/ {printf $2;exit;}' "${XDG_CONFIG_HOME}/nitrogen/bg-saved.cfg")" + image="$(awk -F'=' '/file/ {printf $2;exit;}' \ + "${XDG_CONFIG_HOME}/nitrogen/bg-saved.cfg")" else image="$(gsettings get org.gnome.desktop.background picture-uri)" @@ -2544,7 +2548,8 @@ get_term_size() { # If the ID was found get the window size. if [[ "$current_window" ]]; then - term_size="$(xwininfo -id "$current_window" | awk -F ': ' '/Width|Height/ {printf $2 " "}')" + term_size="$(xwininfo -id "$current_window" |\ + awk -F ': ' '/Width|Height/ {printf $2 " "}')" term_width="${term_size/ *}" term_height="${term_size/${term_width}}" else @@ -2680,15 +2685,20 @@ 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: libcaca failed to display the image." + 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." + catimg -w "$((width * 2 / font_width))" -r 0 "$image" ||\ + to_off "Image: catimg failed to display the image." ;; "jp2a") - jp2a --width="$((width / font_width))" --colors "$image" || to_off "Image: jp2a failed to display the image." + jp2a --width="$((width / font_width))" --colors "$image" ||\ + to_off "Image: jp2a failed to display the image." ;; "sixel") @@ -2696,11 +2706,13 @@ display_image() { ;; "termpix") - termpix --width "$((width / font_width))" "$image" || to_off "Image: termpix failed to display the image." + termpix --width "$((width / font_width))" "$image" ||\ + to_off "Image: termpix failed to display the image." ;; "iterm2") - iterm_cmd="\033]1337;File=width=${width}px;height=${height}px;inline=1:$(base64 < "$image")" + image="$(base64 < "$image")" + iterm_cmd="\033]1337;File=width=${width}px;height=${height}px;inline=1:${image}" # Tmux requires an additional escape sequence for this to work. [[ -n "$TMUX" ]] && iterm_cmd="\033Ptmux;\033${iterm_cmd}\033\\" @@ -2709,7 +2721,8 @@ display_image() { ;; "tycat") - tycat "$image" || to_off "Image: tycat failed to display the image." + tycat "$image" ||\ + to_off "Image: tycat failed to display the image." ;; "w3m") @@ -2719,7 +2732,8 @@ display_image() { # appearing in specific terminal emulators. 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." + "${w3m_img_path:-false}" -bg "$background_color" >/dev/null 2>&1 ||\ + to_off "Image: w3m-img failed to display the image." zws="\xE2\x80\x8B\x20" ;; @@ -2777,12 +2791,14 @@ scrot_upload() { case "$image_host" in "teknik") - image_url="$(curl -sf -F file="@${image_file};type=image/png" "https://api.teknik.io/v1/Upload")" + image_url="$(curl -sf -F file="@${image_file};type=image/png" \ + "https://api.teknik.io/v1/Upload")" image_url="$(awk -F 'url:|,' '{printf $2}' <<< "${image_url//\"}")" ;; "imgur") - image_url="$(curl -sH "Authorization: Client-ID 0e8b44d15e9fc95" -F image="@${image_file}" "https://api.imgur.com/3/upload")" + image_url="$(curl -sH "Authorization: Client-ID 0e8b44d15e9fc95" \ + -F image="@${image_file}" "https://api.imgur.com/3/upload")" image_url="$(awk -F 'id:|,' '{printf $2}' <<< "${image_url//\"}")" [[ "$image_url" ]] && image_url="https://i.imgur.com/${image_url}.png" ;; @@ -2920,7 +2936,8 @@ prin() { get_underline() { if [[ "$underline_enabled" == "on" ]]; then printf -v underline "%${length}s" - printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}${underline// /$underline_char}${reset} " + printf "%b%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}" \ + "${underline// /$underline_char}${reset} " unset -v length fi prin=1 @@ -3620,7 +3637,8 @@ 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"* | "windows10" | "windows8" ) set_colors 6 7 ascii_file="windows10" ;; @@ -3949,41 +3967,67 @@ old_functions() { } old_options() { - [[ -n "$osx_buildversion" ]] && err "Config: \$osx_buildversion is deprecated, use \$distro_shorthand instead." - [[ -n "$osx_codename" ]] && err "Config: \$osx_codename is deprecated, use \$distro_shorthand instead." - [[ "$cpu_cores" == "on" ]] && err "Config: cpu_cores='on' is deprecated, use cpu_cores='logical|physical|off' instead." - [[ -n "$image" ]] && { err "Config: \$image is deprecated, use \$image_source instead."; image_source="$image"; } + [[ -n "$osx_buildversion" ]] && \ + err "Config: \$osx_buildversion is deprecated, use \$distro_shorthand instead." + [[ -n "$osx_codename" ]] && \ + err "Config: \$osx_codename is deprecated, use \$distro_shorthand instead." + [[ "$cpu_cores" == "on" ]] && \ + err "Config: cpu_cores='on' is deprecated, use cpu_cores='logical|physical|off' instead." + [[ -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."; 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"; } + [[ -n "$progress_char" ]] && \ + err "Config: \$progress_char is deprecated, use \$bar_char_{elapsed,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." - [[ "$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." + [[ "$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 3.0. - [[ "$ascii_logo_size" ]] && err "Config: ascii_logo_size is deprecated, use ascii_distro='{alpine,arch,crux,gentoo,openbsd,void}_small' instead." + [[ "$ascii_logo_size" ]] && \ + err "Config: ascii_logo_size is deprecated, use ascii_distro='{distro}_small' instead." # $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"); } + [[ "$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. - [[ "$cpu_temp" == "on" ]] && { err "Config: cpu_temp='on' is deprecated, use cpu_temp='C' or 'F' instead."; cpu_temp="C"; } + [[ "$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"; } + [[ -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= # cpu_shorthand was deprecated in 3.3.0 - [[ -n "$cpu_shorthand" ]] && { err "Config: \$cpu_shorthand is deprecated, use \$cpu_brand, \$cpu_cores, and \$cpu_speed instead."; } + [[ -n "$cpu_shorthand" ]] && \ + { err "Config: \$cpu_shorthand is deprecated, use \$cpu_brand, \$cpu_cores, and + \$cpu_speed instead."; } } cache_uname() { @@ -4124,7 +4168,7 @@ INFO: --disable infoname Allows you to disable an info line from appearing in the output. - NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu disk shell' + NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu' --os_arch on/off Hide/Show OS architecture. --speed_type type Change the type of cpu speed to display. @@ -4135,7 +4179,8 @@ INFO: --speed_shorthand on/off Whether or not to show decimals in CPU speed. - NOTE: This flag is not supported in systems with CPU speed less than 1 GHz. + NOTE: This flag is not supported in systems with CPU speed less than + 1 GHz. --cpu_brand on/off Enable/Disable CPU brand in output. --cpu_cores type Whether or not to display the number of CPU cores @@ -4148,7 +4193,8 @@ INFO: NOTE: This only works on Linux and BSD. - NOTE: For FreeBSD and NetBSD-based systems, you need to enable coretemp kernel module. This only supports newer Intel processors. + NOTE: For FreeBSD and NetBSD-based systems, you need to enable + coretemp kernel module. This only supports newer Intel processors. --distro_shorthand on/off Shorten the output of distro (tiny, on, off) @@ -4222,9 +4268,11 @@ BARS: IMAGE BACKEND: --backend backend Which image backend to use. - Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', '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/' + 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. @@ -4236,7 +4284,8 @@ IMAGE 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/' + NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img', + '/path/to/ascii', '/path/to/dir/' ASCII: --ascii_colors x x x x x x Colors to print the ascii art @@ -4248,9 +4297,11 @@ ASCII: NOTE: Ubuntu has flavor variants. - NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME', 'Ubuntu-Studio' or 'Ubuntu-Budgie' to use the flavors. + NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME', + 'Ubuntu-Studio' or 'Ubuntu-Budgie' to use the flavors. - NOTE: Alpine, Arch, CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, and Void have a smaller logo variant. + NOTE: Alpine, Arch, CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, + OpenBSD, and Void have a smaller logo variant. NOTE: Use '{distro name}_small' to use the small variants. @@ -4260,7 +4311,8 @@ 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. + --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 @@ -4277,7 +4329,8 @@ IMAGE: This only works with w3m. --gap num Gap between image and text. - NOTE: --gap can take a negative value which will move the text closer to the left side. + NOTE: --gap can take a negative value which will move the text + closer to the left side. --clean Delete cached files and thumbnails. @@ -4439,7 +4492,8 @@ get_args() { # Image backend "--backend") image_backend="$2" ;; "--source") image_source="$2" ;; - "--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--sixel" | "--termpix" | "--tycat" | "--w3m") + "--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--sixel" |\ + "--termpix" | "--tycat" | "--w3m") image_backend="${1/--}" case "$2" in "-"* | "") ;; @@ -4512,7 +4566,11 @@ get_args() { "-vv") set -x; verbose="on" ;; "--help") usage ;; "--version") version ;; - "--gen-man") help2man -n"A fast, highly customizable system info script" -N ./neofetch -o neofetch.1; exit 1 ;; + "--gen-man") + help2man -n "A fast, highly customizable system info script" \ + -N ./neofetch -o neofetch.1 + exit 1 + ;; esac shift diff --git a/neofetch.1 b/neofetch.1 index 21e96bd8..0980355e 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" "July 2017" "Neofetch 3.2.1-git" "User Commands" +.TH NEOFETCH "1" "August 2017" "Neofetch 3.2.1-git" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS @@ -18,7 +18,7 @@ NOTE: Every launch flag has a config option. Allows you to disable an info line from appearing in the output. .IP -NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu disk shell' +NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu' .TP \fB\-\-os_arch\fR on/off Hide/Show OS architecture. @@ -32,8 +32,9 @@ NOTE: This only supports Linux with cpufreq. .TP \fB\-\-speed_shorthand\fR on/off Whether or not to show decimals in CPU speed. -.IP -NOTE: This flag is not supported in systems with CPU speed less than 1 GHz. +.TP +NOTE: This flag is not supported in systems with CPU speed less than +1 GHz. .TP \fB\-\-cpu_brand\fR on/off Enable/Disable CPU brand in output. @@ -51,8 +52,9 @@ Hide/Show cpu speed. Hide/Show cpu temperature. .IP NOTE: This only works on Linux and BSD. -.IP -NOTE: For FreeBSD and NetBSD\-based systems, you need to enable coretemp kernel module. This only supports newer Intel processors. +.TP +NOTE: For FreeBSD and NetBSD\-based systems, you need to enable +coretemp kernel module. This only supports newer Intel processors. .TP \fB\-\-distro_shorthand\fR on/off Shorten the output of distro (tiny, on, off) @@ -182,11 +184,13 @@ Possible values: bar, infobar, barinfo, off .TP \fB\-\-backend\fR backend Which image backend to use. -Possible values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'sixel', '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. -Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' +Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', +\&'/path/to/ascii', '/path/to/dir/' .TP \fB\-\-ascii\fR source Shortcut to use 'ascii' backend. @@ -218,7 +222,8 @@ Shortcut to use 'w3m' backend. \fB\-\-off\fR Shortcut to use 'off' backend. .IP -NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/' +NOTE: 'source; can be any of the following: 'auto', 'ascii', 'wallpaper', '/path/to/img', +\&'/path/to/ascii', '/path/to/dir/' .SS "ASCII:" .TP \fB\-\-ascii_colors\fR x x x x x x @@ -232,10 +237,12 @@ NOTE: Arch and Ubuntu have 'old' logo variants. NOTE: Use 'arch_old' or 'ubuntu_old' to use the old logos. .IP NOTE: Ubuntu has flavor variants. -.IP -NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu\-GNOME', 'Ubuntu\-Studio' or 'Ubuntu\-Budgie' to use the flavors. -.IP -NOTE: Alpine, Arch, CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, and Void have a smaller logo variant. +.TP +NOTE: Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu\-GNOME', +\&'Ubuntu\-Studio' or 'Ubuntu\-Budgie' to use the flavors. +.TP +NOTE: Alpine, Arch, CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, +OpenBSD, and Void have a smaller logo variant. .IP NOTE: Use '{distro name}_small' to use the small variants. .TP @@ -249,7 +256,8 @@ 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. +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. @@ -278,8 +286,9 @@ This only works with w3m. .TP \fB\-\-gap\fR num Gap between image and text. -.IP -NOTE: \fB\-\-gap\fR can take a negative value which will move the text closer to the left side. +.TP +NOTE: \fB\-\-gap\fR can take a negative value which will move the text +closer to the left side. .TP \fB\-\-clean\fR Delete cached files and thumbnails. From 40e77788dd547082086dc24822d3b0ad1cef4032 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 12:29:09 +1000 Subject: [PATCH 084/177] general: Enforce 100 chars per line. --- neofetch | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/neofetch b/neofetch index a18de264..18053f90 100755 --- a/neofetch +++ b/neofetch @@ -796,7 +796,7 @@ get_wm_theme() { "PekWM") [[ -f "${HOME}/.pekwm/config" ]] && \ - wm_theme="$(awk -F "/" '/Theme/ {gsub(/\"/,""); print $NF}' "${HOME}/.pekwm/config")" + wm_theme="$(awk -F "/" '/Theme/{gsub(/\"/,""); print $NF}' "${HOME}/.pekwm/config")" ;; "Xfwm4") @@ -809,11 +809,16 @@ get_wm_theme() { kwinrc="${kde_config_dir}/kwinrc" kdebugrc="${kde_config_dir}/kdebugrc" - # TODO: Fix line length here. if [[ -f "$kwinrc" ]]; then - wm_theme="$(awk '/theme=/{gsub(/theme=.*qml_|theme=.*svg__/,"",$0); print $0; exit}' "$kwinrc")" - [[ -z "$wm_theme" ]] && wm_theme="$(awk '/library=org.kde/{gsub(/library=org.kde./,"",$0); print $0; exit}' "$kwinrc")" - [[ -z "$wm_theme" ]] && wm_theme="$(awk '/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0); print $0; exit}' "$kwinrc")" + wm_theme="$(awk '/theme=/{gsub(/theme=.*qml_|theme=.*svg__/,"",$0); + print $0; exit}' "$kwinrc")" + + [[ -z "$wm_theme" ]] && \ + wm_theme="$(awk '/library=org.kde/{gsub(/library=org.kde./,"",$0); + print $0; exit}' "$kwinrc")" + [[ -z "$wm_theme" ]] && \ + wm_theme="$(awk '/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0); + print $0; exit}' "$kwinrc")" elif [[ -f "$kdebugrc" ]]; then wm_theme="$(awk '/(decoration)/ {gsub(/\[/,"",$1); print $1; exit}' "$kdebugrc")" @@ -881,9 +886,11 @@ get_cpu() { ;; *) - # TODO: Fix line length here. - cpu="$(awk -F ': | @' '/model name|Processor|^cpu model|chip type|^cpu type/ {printf $2; exit}' "$cpu_file")" - [[ "$cpu" == *"processor rev"* ]] && cpu="$(awk -F':' '/Hardware/ {print $2; exit}' "$cpu_file")" + cpu="$(awk -F ': | @' '/model name|Processor|^cpu model|chip type|^cpu type/ + {printf $2; exit}' "$cpu_file")" + + [[ "$cpu" == *"processor rev"* ]] && \ + cpu="$(awk -F':' '/Hardware/ {print $2; exit}' "$cpu_file")" ;; esac @@ -1384,8 +1391,11 @@ get_memory() { } get_song() { - # TODO: Fix line length here. - 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|pogo/ {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|pogo/ + {printf $5 " " $6; exit}')" get_song_dbus() { # Multiple players use an almost identical dbus command to get the information. @@ -1855,7 +1865,6 @@ get_term_font() { for i in "${konsole_instances[@]}"; do konsole_sessions=($(qdbus "${i}" | grep '/Sessions/')) - # TODO: Swap to a while loop here. for session in "${konsole_sessions[@]}"; do if ((child == "$(qdbus "${i}" "${session}" processId)")); then profile="$(qdbus "${i}" "${session}" environment |\ @@ -1898,11 +1907,15 @@ get_term_font() { rm -f "$mateterm_config" - # TODO: Limit line length here. - if [[ "$(gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/"${profile}"/ use-system-font)" == "true" ]]; then + mate_get() { + gsettings get org.mate.terminal.profile:\ + /org/mate/terminal/profiles/"$1"/ "$2" + } + + if [[ "$(mate_get "$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)" + term_font="$(mate_get "$profile" "font")" fi term_font="$(trim_quotes "$term_font")" fi From aaba03f0a9cb86aa3462f86b9ce5f1f31425b244 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 12:34:53 +1000 Subject: [PATCH 085/177] travis: Test for line length --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 381e0cab..7268a088 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,3 +21,4 @@ script: # 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 + - ! grep '.\{101\}' neofetch From 5dedfd22b2e516587fed37e402abac9ca40a11e5 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 12:44:33 +1000 Subject: [PATCH 086/177] travis: Test for line length --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7268a088..42da819a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,4 +21,4 @@ script: # 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 - - ! grep '.\{101\}' neofetch + - if grep '.\{101\}' neofetch; then (exit 1); else (exit 0); fi From 5467fb47dae50721d85e30db22467f2f9e88883e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 12:54:41 +1000 Subject: [PATCH 087/177] general: Fix indent --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 18053f90..8d0361d1 100755 --- a/neofetch +++ b/neofetch @@ -4040,7 +4040,7 @@ old_options() { # cpu_shorthand was deprecated in 3.3.0 [[ -n "$cpu_shorthand" ]] && \ { err "Config: \$cpu_shorthand is deprecated, use \$cpu_brand, \$cpu_cores, and - \$cpu_speed instead."; } + \$cpu_speed instead."; } } cache_uname() { From d7abf3ce684d26005701bd788ea2cad0d7a9100e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 12:57:00 +1000 Subject: [PATCH 088/177] general: Enforce 100 chars per line. --- .travis.yml | 2 +- neofetch | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 42da819a..680643c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,5 +20,5 @@ script: - 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 + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then shellcheck neofetch -e SC1090,SC2009,SC2012,SC2016,SC2034,SC2128,SC2153,SC2154,SC2178,SC2010,SC1004; fi - if grep '.\{101\}' neofetch; then (exit 1); else (exit 0); fi diff --git a/neofetch b/neofetch index 8d0361d1..d473f385 100755 --- a/neofetch +++ b/neofetch @@ -1391,9 +1391,9 @@ get_memory() { } get_song() { - 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| + 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|pogo/ {printf $5 " " $6; exit}')" From e53404e3494b6147a30870fc9f98388a4adc1837 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 12:58:08 +1000 Subject: [PATCH 089/177] general: Fix awk missing backslash --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index d473f385..f4743eef 100755 --- a/neofetch +++ b/neofetch @@ -886,7 +886,7 @@ get_cpu() { ;; *) - cpu="$(awk -F ': | @' '/model name|Processor|^cpu model|chip type|^cpu type/ + cpu="$(awk -F ': | @' '/model name|Processor|^cpu model|chip type|^cpu type/\ {printf $2; exit}' "$cpu_file")" [[ "$cpu" == *"processor rev"* ]] && \ From 4c48b426accb5f553012f920f7e1036746ce05d9 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 13:06:17 +1000 Subject: [PATCH 090/177] general: Fix missing backslashes --- neofetch | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/neofetch b/neofetch index f4743eef..c92f37b7 100755 --- a/neofetch +++ b/neofetch @@ -810,14 +810,14 @@ get_wm_theme() { kdebugrc="${kde_config_dir}/kdebugrc" if [[ -f "$kwinrc" ]]; then - wm_theme="$(awk '/theme=/{gsub(/theme=.*qml_|theme=.*svg__/,"",$0); + wm_theme="$(awk '/theme=/{gsub(/theme=.*qml_|theme=.*svg__/,"",$0);\ print $0; exit}' "$kwinrc")" [[ -z "$wm_theme" ]] && \ - wm_theme="$(awk '/library=org.kde/{gsub(/library=org.kde./,"",$0); + wm_theme="$(awk '/library=org.kde/{gsub(/library=org.kde./,"",$0);\ print $0; exit}' "$kwinrc")" [[ -z "$wm_theme" ]] && \ - wm_theme="$(awk '/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0); + wm_theme="$(awk '/PluginLib=kwin3_/{gsub(/PluginLib=kwin3_/,"",$0);\ print $0; exit}' "$kwinrc")" elif [[ -f "$kdebugrc" ]]; then @@ -1437,7 +1437,7 @@ get_song() { ;; "cmus"*) - song="$(cmus-remote -Q | awk '/tag artist/ {$1=$2=""; print; print " - "} + song="$(cmus-remote -Q | awk '/tag artist/ {$1=$2=""; print; print " - "}\ /tag title/ {$1=$2=""; print}')" ;; @@ -1446,14 +1446,14 @@ get_song() { "Linux") get_song_dbus "spotify" ;; "Mac OS X") - song="$(osascript -e 'tell application "Spotify" to artist of current track as + song="$(osascript -e 'tell application "Spotify" to artist of current track as \ string & " - " & name of current track as string')" ;; esac ;; "itunes"*) - song="$(osascript -e 'tell application "iTunes" to artist of current track as + song="$(osascript -e 'tell application "iTunes" to artist of current track as \ string & " - " & name of current track as string')" ;; @@ -1479,14 +1479,14 @@ get_song() { "quodlibet"*) song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet \ /net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\ - awk -F'"' '/artist/ {getline; a=$2} + awk -F'"' '/artist/ {getline; a=$2} \ /title/ {getline; t=$2} END{print a " - " t}')" ;; "pogo"*) song="$(dbus-send --print-reply --dest=org.mpris.pogo /Player \ org.freedesktop.MediaPlayer.GetMetadata | - awk -F'"' '/string "artist"/ {getline; a=$2} /string "title"/ {getline; t=$2} + awk -F'"' '/string "artist"/ {getline; a=$2} /string "title"/ {getline; t=$2} \ END{print a " - " t}')" ;; @@ -1563,7 +1563,7 @@ get_resolution() { case "$refresh_rate" in "on") resolution="$(xrandr --nograb --current |\ - awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " + awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ "\ substr($0,RSTART,RLENGTH) "Hz, "}')" ;; @@ -1797,7 +1797,7 @@ get_term_font() { ;; "Apple_Terminal") - term_font="$(osascript -e 'tell application "Terminal" to + term_font="$(osascript -e 'tell application "Terminal" to \ font name of window frontmost')" ;; @@ -1809,18 +1809,15 @@ get_term_font() { # See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg local current_profile_name profiles_count profile_name diff_font none_ascii - current_profile_name="$(osascript -e 'tell application "iTerm2" to 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 + font_file="${HOME}/Library/Preferences/com.googlecode.iterm2.plist" # Count Guids in "New Bookmarks"; they should be unique - profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" \ - "" |\ - grep -c "Guid")" - - font_file="${HOME}/Library/Preferences/com.googlecode.iterm2.plist" + profiles_count="$(PlistBuddy -c "Print :New\ Bookmarks:" "$font_file" | grep -c "Guid")" for ((i=0; i<=profiles_count; i++)); do profile_name="$(PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" "$font_file")" @@ -1901,8 +1898,8 @@ get_term_font() { role="${role//\"}" profile="$(awk -F '=' -v r="$role" \ - '$0~r {getline; if(/Maximized/) getline; - if(/Fullscreen/) getline; id=$2"]"} + '$0~r {getline; if(/Maximized/) getline; \ + if(/Fullscreen/) getline; id=$2"]"} \ $0~id {if(id) {getline; print $2; exit}}' "$mateterm_config")" rm -f "$mateterm_config" @@ -1950,7 +1947,7 @@ get_term_font() { [[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && \ termite_config="${XDG_CONFIG_HOME}/termite/config" - term_font="$(awk -F '= ' '/\[options\]/ {opt=1} /^\s*font/ {if(opt==1) a=$2; opt=0} + 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")" ;; From b3d15cd168108d94480e341be7091cc82aa847a3 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 13:07:42 +1000 Subject: [PATCH 091/177] general: Fix whitespace --- neofetch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/neofetch b/neofetch index c92f37b7..f15c07d6 100755 --- a/neofetch +++ b/neofetch @@ -765,7 +765,7 @@ get_wm_theme() { "E17" | "Enlightenment") if type -p eet >/dev/null; then - wm_theme="$(eet -d "${HOME}/.e/e/config/standard/e.cfg" config | \ + wm_theme="$(eet -d "${HOME}/.e/e/config/standard/e.cfg" config |\ awk '/value \"file\" string.*.edj/ {print $4}')" wm_theme="${wm_theme##*/}" wm_theme="${wm_theme%.*}" @@ -900,9 +900,9 @@ get_cpu() { # Get CPU speed. if [[ -d "$speed_dir" ]]; then # Fallback to bios_limit if $speed_type fails. - speed="$(< "${speed_dir}/${speed_type}")" || \ - speed="$(< "${speed_dir}/bios_limit")" || \ - speed="$(< "${speed_dir}/scaling_max_freq")" || \ + speed="$(< "${speed_dir}/${speed_type}")" ||\ + speed="$(< "${speed_dir}/bios_limit")" ||\ + speed="$(< "${speed_dir}/scaling_max_freq")" ||\ speed="$(< "${speed_dir}/cpuinfo_max_freq")" speed="$((speed / 1000))" @@ -1161,7 +1161,7 @@ get_gpu() { for gpu in "${gpus[@]}"; do # GPU shorthand tests. - [[ "$gpu_type" == "dedicated" && "$gpu" =~ (i|I)ntel ]] || \ + [[ "$gpu_type" == "dedicated" && "$gpu" =~ (i|I)ntel ]] ||\ [[ "$gpu_type" == "integrated" && ! "$gpu" =~ (i|I)ntel ]] && \ { unset -v gpu; continue; } @@ -1215,7 +1215,7 @@ get_gpu() { source "${cache_dir}/neofetch/gpu" else - gpu="$(system_profiler SPDisplaysDataType | \ + gpu="$(system_profiler SPDisplaysDataType |\ awk -F': ' '/^\ *Chipset Model:/ {printf $2 ", "}')" gpu="${gpu//'/ $'}" gpu="${gpu%,*}" @@ -1262,7 +1262,7 @@ get_gpu() { ;; "Haiku") - gpu="$(listdev | grep -A2 -F 'device Display controller' | \ + gpu="$(listdev | grep -A2 -F 'device Display controller' |\ awk -F':' '/device beef/ {print $2}')" ;; @@ -1568,7 +1568,7 @@ get_resolution() { ;; "off") - resolution="$(xrandr --nograb --current | \ + resolution="$(xrandr --nograb --current |\ awk -F 'connected |\\+' '/ connected/ {printf $2 ", "}')" resolution="${resolution/primary }" ;; @@ -1984,7 +1984,7 @@ get_term_font() { } get_disk() { - type -p df >/dev/null 2>&1 || \ + type -p df >/dev/null 2>&1 ||\ { err "Disk requires 'df' to function. Install 'df' to get disk info."; return; } # Get "df" version. From 9c8afe56c38eca0ef4a4f506905f2a9ba44fc6fa Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Aug 2017 13:09:33 +1000 Subject: [PATCH 092/177] docs: travis --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 680643c2..388082b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,4 +21,7 @@ script: # 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,SC1004; fi + # The if statement is here to invert the exit code from grep. + # grep normally errors if no match is found but we want the opposite. + # We invert it so grep fails if a match is found. - if grep '.\{101\}' neofetch; then (exit 1); else (exit 0); fi From 04c22a8edd6064b63aac557597bae565f4848f8b Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 3 Aug 2017 15:16:52 +0700 Subject: [PATCH 093/177] Misc: Reimplement stdout --- neofetch | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index ec3001b5..9e49c2d6 100755 --- a/neofetch +++ b/neofetch @@ -2801,7 +2801,7 @@ prin() { string="${subtitle_color}${bold}${string}" # Print the info. - printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${string}${reset} " + printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${string}${reset}" # Calculate info height. ((++info_height)) @@ -2813,7 +2813,7 @@ prin() { get_underline() { if [[ "$underline_enabled" == "on" ]]; then printf -v underline "%${length}s" - printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}${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 @@ -3636,6 +3636,20 @@ color() { # OTHER +stdout() { + image_backend="off" + unset subtitle_color + unset colon_color + unset info_color + unset underline_color + unset bold + unset title_color + unset at_color + unset text_padding + unset zws + unset reset +} + err() { err+="$(color 1)[!]\033[0m $1\n" } @@ -4401,6 +4415,7 @@ get_args() { ;; esac ;; + "--stdout") stdout="on" ;; "-v") verbose="on" ;; "-vv") set -x; verbose="on" ;; "--help") usage ;; @@ -4421,9 +4436,10 @@ main() { get_distro get_bold get_distro_colors + [[ "$stdout" == "on" ]] && stdout # Minix doesn't support these sequences. - if [[ "$TERM" != "minix" ]]; then + if [[ "$TERM" != "minix" && "$stdout" != "on" ]]; then # If the script exits for any reason, unhide the cursor. trap 'printf "\033[?25h\033[?7h"' EXIT From faa71d0f95571800a8eaea221a8a6f915ff46ff8 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 4 Aug 2017 00:15:55 +0700 Subject: [PATCH 094/177] Docs: CHANGELOG and manpage --- CHANGELOG.md | 1 + config/config.conf | 6 ++++++ neofetch | 1 + neofetch.1 | 5 ++++- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb8d4fa5..4f4abcae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - 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. +- `stdout` mode is now reimplemented. ## Operating System diff --git a/config/config.conf b/config/config.conf index 33b3cf82..44b03a0b 100644 --- a/config/config.conf +++ b/config/config.conf @@ -717,6 +717,12 @@ image_host="teknik" # Misc Options +# Stdout mode +# Turn off all colors and disables image backend (ASCII/Image). +# Useful for piping into another command. +# Default: 'off' +# Values: 'on', 'off' +stdout="off" # Config version. # diff --git a/neofetch b/neofetch index 9e49c2d6..33460cf8 100755 --- a/neofetch +++ b/neofetch @@ -4198,6 +4198,7 @@ SCREENSHOT: OTHER: --config /path/to/config Specify a path to a custom config file --config none Launch the script without a config file + --stdout Turn off all colors and disables any ASCII/image backend. --help Print this text and exit --version Show neofetch version -v Display error messages. diff --git a/neofetch.1 b/neofetch.1 index 21e96bd8..c31f1c90 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" "July 2017" "Neofetch 3.2.1-git" "User Commands" +.TH NEOFETCH "1" "August 2017" "Neofetch 3.2.1-git" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS @@ -304,6 +304,9 @@ Specify a path to a custom config file \fB\-\-config\fR none Launch the script without a config file .TP +\fB\-\-stdout\fR +Turn off all colors and disables any ASCII/image backend. +.TP \fB\-\-help\fR Print this text and exit .TP From e8dc4670e1f676bf9c9e98ae2e45cae1a154c615 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 4 Aug 2017 01:29:29 +0700 Subject: [PATCH 095/177] stdout: Disable color_blocks --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 33460cf8..b2eca221 100755 --- a/neofetch +++ b/neofetch @@ -3648,6 +3648,7 @@ stdout() { unset text_padding unset zws unset reset + unset color_blocks } err() { From 9d72eea931e4c28a7a05e8c408feef28e0a49d92 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 4 Aug 2017 11:10:34 +1000 Subject: [PATCH 096/177] stdout: Disable linebreaks --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index b2eca221..ce3ca301 100755 --- a/neofetch +++ b/neofetch @@ -3649,6 +3649,7 @@ stdout() { unset zws unset reset unset color_blocks + unset get_line_break } err() { From ab3633ab1cb5cebd7e04d522e52bd9646820a008 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 4 Aug 2017 11:14:26 +1000 Subject: [PATCH 097/177] docs: CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f4abcae..9787a2d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ - 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. - `stdout` mode is now reimplemented. + - This mode prints the information in plain text. + - You can use it with `--stdout`. + - Example: https://gist.github.com/dylanaraps/151c205322cf3acae62661b76464a3f7 ## Operating System From 2d328845f7186610a564b19a694ab4dd08b64b5c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 4 Aug 2017 12:39:35 +1000 Subject: [PATCH 098/177] OS: Added supprot for Artix --- ascii/distro/artix | 20 ++++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 25 insertions(+) create mode 100644 ascii/distro/artix diff --git a/ascii/distro/artix b/ascii/distro/artix new file mode 100644 index 00000000..61ea4cfe --- /dev/null +++ b/ascii/distro/artix @@ -0,0 +1,20 @@ +${c1} ./odNMMMMMMMMNdo/. + /ymMMMMMMMMMMMMMMMMMMmy/ + .smMMMMMMMNh/MMMM+oNMMMMMMMms. + oNMMMMMMMho` yMMMMy `/hNMMMMMMNo + .mMMMNdho/` yMMMMm` `-ohdNMMMm. + .mMMMMdhs:. yMMMMM. .:shhNMMMm. + mMMMMMMMMMMmy- .hMMMMh` -ohMMMMMMNNMMm +yMMMMsoNMMMMMMMmMMMMMMMMmMMMMMMMNo:NMMMy +MMMMMd -ymMMMMMMMMMMMMMMMMMMNy:` sMMMMM +MMMMMd ./mMMMMMMMMMMMNm/.` dMMMMM +MMMMMd .oMMMMMMMMMMMMNm+:` dMMMMM +MMMMMd :ymMMMMMMMMMMMMMMMMMMNy:` sMMMMM +yMMMMsoNMMMMMMMMNMMMMMNMmMMMMMMMNo:NMMMy + mMMMMMMMMMMms- yMMMMy -ohMMMMMMNNMMm + .mMMMMdho/. yMMMMM. .-ohhNMMMm. + .mMMMMmhs/. yMMMMm` `-ohdNMMMm. + oNMMMMMMMho. sMMMMy `/hNMMMMMMNo + .smMMMMMMMMh/MMMMooNMMMMMMMms. + /ymMMMMMMMMMMMMMMMMMMmy/ + ./odNMMMMMMMMNdo/. diff --git a/neofetch b/neofetch index ce3ca301..43ded2f1 100755 --- a/neofetch +++ b/neofetch @@ -2963,6 +2963,11 @@ get_distro_colors() { ascii_file="arch" ;; + "Artix"*) + set_colors 4 7 + ascii_file="artix" + ;; + "Arya"*) set_colors 2 1 ascii_file="arya" From 3cefcf0477c3a4794b0c1529192d813259f6ac99 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 4 Aug 2017 12:40:04 +1000 Subject: [PATCH 099/177] docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9787a2d8..96420791 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - Added support for AryaLinux. **[@mstraube](https://github.com/mstraube)** - Added support for Amazon Linux AMI. +- Added support for Artix Linux. - Added support for Endless OS. - Added support for Sabotage Linux. - Added support for Source Mage. From be08f67e57f7e3431cf925f25de35b6ead7816af Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 5 Aug 2017 20:36:14 +0200 Subject: [PATCH 100/177] Term: Add font support for GNUstep Terminal --- neofetch | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neofetch b/neofetch index 43ded2f1..7d9f26cf 100755 --- a/neofetch +++ b/neofetch @@ -1775,6 +1775,12 @@ get_term_font() { term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")" ;; + "GNUstep_Terminal") + term_font="$(awk -F '>|<' '/>TerminalFontTerminalFontSize Date: Sun, 6 Aug 2017 19:23:36 +1000 Subject: [PATCH 101/177] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96420791..7dd7aa24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,6 +66,7 @@ **Terminal Font** - Added support for LXTerminal. **[@mstraube](https://github.com/mstraube)** +- Added support for GNUStep Terminal. **[@mstraube](https://github.com/mstraube)** - Fixed Xfce4-terminal font output when system-wide font is used. **[@mstraube](https://github.com/mstraube)** **Theme** From 57ba17e1956c26915efcb73d310b98b17cc4c6d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20R=C3=BCedlinger?= Date: Fri, 11 Aug 2017 08:49:28 +0200 Subject: [PATCH 102/177] OS: add support for the siduction os MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexander Rüedlinger --- ascii/distro/siduction | 21 +++++++++++++++++++++ neofetch | 11 +++++++++++ 2 files changed, 32 insertions(+) create mode 100644 ascii/distro/siduction diff --git a/ascii/distro/siduction b/ascii/distro/siduction new file mode 100644 index 00000000..10a88ec6 --- /dev/null +++ b/ascii/distro/siduction @@ -0,0 +1,21 @@ +${c1} _aass, + jQh: =$w + QWmwawQW + )$QQQQ@( .. + _a_a. ~??^ syDY?Sa, + _mW>-<$c jWmi imm. + ]QQwayQE 4QQmgwmQQ` + ?WWQWP' -9QQQQQ@'._aas, + _a%is. .adYYs,. -"?!` aQB*~^3$c + _Qh;.nm .QWc. {QL ]QQp;..vmQ/ + "QQmmQ@ -QQQggmQP ]QQWmggmQQ( + -???" "$WQQQY` __, ?QQQQQQW! + _yZ!?q, - .yWY!!Sw, "???^ + .QQa_=qQ mQm>..vmm + $QQWQQP $QQQgmQQ@ + "???" _aa, -9WWQQWY` + _mB>~)$a -~~ + mQms_vmQ. + ]WQQQQQP + -?T??" + diff --git a/neofetch b/neofetch index d34fad6e..57e393b6 100755 --- a/neofetch +++ b/neofetch @@ -78,6 +78,12 @@ get_distro() { *) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)" esac + elif [[ -f "/etc/siduction-version" ]]; then + case "$distro_shorthand" in + "on" | "tiny") distro="Siduction" ;; + *) distro="Siduction ($(lsb_release -sic))" + esac + elif type -p lsb_release >/dev/null; then case "$distro_shorthand" in "on") lsb_flags="-sir" ;; @@ -3560,6 +3566,11 @@ get_distro_colors() { ascii_file="scientific" ;; + "Siduction"*) + set_colors 4 4 + ascii_file="siduction" + ;; + "Slackware"*) set_colors 4 7 1 ascii_file="slackware" From 0acd21732d9b54131a3d11826fc0c97be3bb4100 Mon Sep 17 00:00:00 2001 From: vaernil Date: Fri, 11 Aug 2017 21:31:16 +0200 Subject: [PATCH 103/177] Fix Terminal Font displaying incorrect information in urxvt, if one of the fonts has 'font' in its name --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index d34fad6e..41d1b57a 100755 --- a/neofetch +++ b/neofetch @@ -1961,7 +1961,7 @@ get_term_font() { "urxvt" | "urxvtd" | "rxvt-unicode" | "xterm") term_font="$(grep -i -F "${term/d}*font" < <(xrdb -query))" - term_font="${term_font/*font:}" + term_font="${term_font/*"*font:"}" term_font="$(trim "$term_font")" # Xresources has two different font formats, this checks which From 422084e52a9071e6f2cf0e913668af63296f8753 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 12 Aug 2017 21:03:27 +1000 Subject: [PATCH 104/177] ascii: Remove leading whitespace from logo --- ascii/distro/siduction | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/ascii/distro/siduction b/ascii/distro/siduction index 10a88ec6..c9720a60 100644 --- a/ascii/distro/siduction +++ b/ascii/distro/siduction @@ -1,21 +1,21 @@ -${c1} _aass, - jQh: =$w - QWmwawQW - )$QQQQ@( .. - _a_a. ~??^ syDY?Sa, - _mW>-<$c jWmi imm. - ]QQwayQE 4QQmgwmQQ` - ?WWQWP' -9QQQQQ@'._aas, - _a%is. .adYYs,. -"?!` aQB*~^3$c - _Qh;.nm .QWc. {QL ]QQp;..vmQ/ - "QQmmQ@ -QQQggmQP ]QQWmggmQQ( - -???" "$WQQQY` __, ?QQQQQQW! - _yZ!?q, - .yWY!!Sw, "???^ - .QQa_=qQ mQm>..vmm - $QQWQQP $QQQgmQQ@ - "???" _aa, -9WWQQWY` - _mB>~)$a -~~ - mQms_vmQ. - ]WQQQQQP - -?T??" +${c1} _aass, + jQh: =$w + QWmwawQW + )$QQQQ@( .. + _a_a. ~??^ syDY?Sa, + _mW>-<$c jWmi imm. + ]QQwayQE 4QQmgwmQQ` + ?WWQWP' -9QQQQQ@'._aas, + _a%is. .adYYs,. -"?!` aQB*~^3$c +_Qh;.nm .QWc. {QL ]QQp;..vmQ/ +"QQmmQ@ -QQQggmQP ]QQWmggmQQ( + -???" "$WQQQY` __, ?QQQQQQW! + _yZ!?q, - .yWY!!Sw, "???^ + .QQa_=qQ mQm>..vmm + $QQWQQP $QQQgmQQ@ + "???" _aa, -9WWQQWY` + _mB>~)$a -~~ + mQms_vmQ. + ]WQQQQQP + -?T??" From 6d63a7f155eefb2b0aabdb4ab88428c5bda9e984 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 12 Aug 2017 21:04:13 +1000 Subject: [PATCH 105/177] docs: CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dd7aa24..ed24a4eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - **[@mstraube](https://github.com/mstraube)** - **[@dominiklohmann](https://github.com/dominiklohmann)** +- **[@lexruee](https://github.com/lexruee)** ## General @@ -21,6 +22,7 @@ - Added support for Artix Linux. - Added support for Endless OS. - Added support for Sabotage Linux. +- Added support for Siduction. **[@lexruee](https://github.com/lexruee)** - Added support for Source Mage. - Added support for Parsix GNU/Linux. **[@mstraube](https://github.com/mstraube)** - Fixed Raspbian being detected as ChromeOS. From 837984b5b31ccf065a1565cc2715365a112f6db8 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 12 Aug 2017 19:14:12 +0200 Subject: [PATCH 106/177] OS: Add support for Nurunner --- ascii/distro/nurunner | 19 +++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 ascii/distro/nurunner diff --git a/ascii/distro/nurunner b/ascii/distro/nurunner new file mode 100644 index 00000000..e5529673 --- /dev/null +++ b/ascii/distro/nurunner @@ -0,0 +1,19 @@ +${c1} ,xc + ;00cxXl + ;K0, .xNo. + :KO' .lXx. + cXk. ;xl cXk. + cXk. ;k:.,xo. cXk. + .lXx. :x::0MNl,dd. :KO, + .xNx. cx;:KMMMMMNo'dx. ;KK; + .dNl. cd,cXMMMMMMMMMWd,ox' 'OK: +;WK. 'K,.KMMMMMMMMMMMMMWc.Kx lMO + 'OK: 'dl'xWMMMMMMMMMM0::x: 'OK: + .kNo .xo'xWMMMMMM0;:O: ;KK; + .dXd. .do,oNMMO;ck: ;00, + oNd. .dx,;'cO; ;K0, + oNx. okk; ;K0, + lXx. :KO' + cKk' cXk. + ;00:lXx. + ,kd. diff --git a/neofetch b/neofetch index 541009a7..b5bc78e8 100755 --- a/neofetch +++ b/neofetch @@ -3426,6 +3426,11 @@ get_distro_colors() { ascii_file="nixos" ;; + "Nurunner"*) + set_colors 4 + ascii_file="nurunner" + ;; + "OBRevenge"*) set_colors 1 7 3 ascii_file="obrevenge" From 62824ad87e7872f9c5f23d1dbe37c3e8b8189ed7 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 13 Aug 2017 00:50:17 +0700 Subject: [PATCH 107/177] Docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed24a4eb..43d10ad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - Added support for Siduction. **[@lexruee](https://github.com/lexruee)** - Added support for Source Mage. - Added support for Parsix GNU/Linux. **[@mstraube](https://github.com/mstraube)** +- Added support for Nurunner. **[@mstraube](https://github.com/mstraube)** - Fixed Raspbian being detected as ChromeOS. From 89ce5a63780b1856c94436d577f9dcbb606b7df1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 13 Aug 2017 16:37:27 +1000 Subject: [PATCH 108/177] docs: README --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 770f23ba..16ad5e91 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Neofetch [![Gitter](https://badges.gitter.im/dylanaraps/fetch.svg)](https://gitter.im/dylanaraps/fetch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Freenode](https://img.shields.io/badge/%23neofetch-%20on%20Freenode-brightgreen.svg)](http://irc.lc/freenode/neofetch) [![Build Status](https://travis-ci.org/dylanaraps/neofetch.svg?branch=master)](https://travis-ci.org/dylanaraps/neofetch) [![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) +[![Donate](https://img.shields.io/badge/donate-patreon-yellow.svg)](https://www.patreon.com/dyla) 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. @@ -79,3 +79,13 @@ Thanks to: - Some of the ASCII logos. - [ufetch](https://github.com/jschx/ufetch): - Tiny ASCII logos + + + +## Donate + +Donations will allow me to spend more time working on `neofetch`. + +If you like `neofetch` and want to give back in some way you can donate here: + +**https://patreon.com/dyla** From c108713b9153874b95c689cada38c156c53050bf Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 13 Aug 2017 20:01:20 +1000 Subject: [PATCH 109/177] resolution: Fix broken output. Closes #803 --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index b5bc78e8..e3632240 100755 --- a/neofetch +++ b/neofetch @@ -1577,7 +1577,8 @@ get_resolution() { "off") resolution="$(xrandr --nograb --current |\ - awk -F 'connected |\\+' '/ connected/ {printf $2 ", "}')" + awk -F 'connected |\\+|\\(' \ + '/ connected/ && $2 {printf $2 ", "}')" resolution="${resolution/primary }" ;; esac From 738ef06d3f985a3021b7e1a3fc64cd24627358d1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 16 Aug 2017 10:46:19 +1000 Subject: [PATCH 110/177] model: Add support for KVM/QEMU. --- config/config.conf | 2 +- config/travis.conf | 2 +- neofetch | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/config.conf b/config/config.conf index 44b03a0b..64dfd1a3 100644 --- a/config/config.conf +++ b/config/config.conf @@ -9,7 +9,7 @@ print_info() { info underline info "OS" distro - info "Model" model + info "Host" model info "Kernel" kernel info "Uptime" uptime info "Packages" packages diff --git a/config/travis.conf b/config/travis.conf index ad3bac08..137de46e 100644 --- a/config/travis.conf +++ b/config/travis.conf @@ -5,8 +5,8 @@ print_info() { info title info underline - info "Model" model info "OS" distro + info "Host" model info "Kernel" kernel info "Uptime" uptime info "Packages" packages diff --git a/neofetch b/neofetch index e3632240..4eea1b69 100755 --- a/neofetch +++ b/neofetch @@ -342,6 +342,10 @@ get_model() { model="${model//Default string}" model="${model//Not Specified}" model="${model//Type1ProductConfigId}" + + case "$model" in + "Standard PC"*) model="KVM/QEMU" ;; + esac } get_title() { From 69012eb0ff8be1c5038c83ce5157c0bd7742f6a1 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 16 Aug 2017 10:49:37 +1000 Subject: [PATCH 111/177] model: Show virtualized hardware too. --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 4eea1b69..8317bba9 100755 --- a/neofetch +++ b/neofetch @@ -344,7 +344,7 @@ get_model() { model="${model//Type1ProductConfigId}" case "$model" in - "Standard PC"*) model="KVM/QEMU" ;; + "Standard PC"*) model="KVM/QEMU (${model})" ;; esac } From f27981b3d7ba6ae2d8207e8abd9218ad3c7ee522 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Wed, 16 Aug 2017 16:53:10 +1000 Subject: [PATCH 112/177] distro: Remove 'Enterprise Server' from SUSE output. Closes #807 --- neofetch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/neofetch b/neofetch index d34fad6e..a15b13db 100755 --- a/neofetch +++ b/neofetch @@ -223,6 +223,8 @@ get_distro() { ;; esac + distro="${distro//Enterprise Server}" + [[ -z "$distro" ]] && distro="$os (Unknown)" # Get OS architecture. From d5dd1ec6d609b0b1d184bffa2999b5e716720528 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 17 Aug 2017 10:16:10 +1000 Subject: [PATCH 113/177] theme: Show KDE and GTK information together. --- neofetch | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/neofetch b/neofetch index 8317bba9..8a6ffc19 100755 --- a/neofetch +++ b/neofetch @@ -1613,15 +1613,12 @@ get_style() { if [[ -f "${kde_config_dir}/kdeglobals" ]]; then kde_config_file="${kde_config_dir}/kdeglobals" - theme="$(grep "^${kde}" "$kde_config_file")" - theme="${theme/${kde}*=}" - theme="$(uppercase "$theme")" - - gtk_shorthand="on" + kde_theme="$(grep "^${kde}" "$kde_config_file")" + kde_theme="${theme/${kde}*=}" + kde_theme="$(uppercase "$theme")" else err "Theme: KDE config files not found, skipping." fi - return ;; *"Cinnamon"*) @@ -1700,6 +1697,7 @@ get_style() { # Toggle visibility of GTK themes. [[ "$gtk2" == "off" ]] && unset gtk2_theme [[ "$gtk3" == "off" ]] && unset gtk3_theme + [[ "$kde" == "off" ]] && unset kde_theme # Format the string based on which themes exist. if [[ "$gtk2_theme" && "$gtk2_theme" == "$gtk3_theme" ]]; then @@ -1716,12 +1714,13 @@ get_style() { fi # Final string. - theme="${gtk2_theme}${gtk3_theme}" + theme="${kde_theme}${gtk2_theme}${gtk3_theme}" # Make the output shorter by removing "[GTKX]" from the string. if [[ "$gtk_shorthand" == "on" ]]; then theme="${theme// '[GTK'[0-9]']'}" theme="${theme/ '[GTK2/3]'}" + theme="${theme/ '[KDE]'}" fi fi } From 35851d92ebbbbea1e49a924572648421451b898e Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 17 Aug 2017 10:31:26 +1000 Subject: [PATCH 114/177] theme: Fix issues. --- neofetch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index 8a6ffc19..8619b54f 100755 --- a/neofetch +++ b/neofetch @@ -1614,8 +1614,8 @@ get_style() { kde_config_file="${kde_config_dir}/kdeglobals" kde_theme="$(grep "^${kde}" "$kde_config_file")" - kde_theme="${theme/${kde}*=}" - kde_theme="$(uppercase "$theme")" + kde_theme="${kde_theme/${kde}*=}" + kde_theme="$(uppercase "$kde_theme") [KDE], " else err "Theme: KDE config files not found, skipping." fi @@ -1697,10 +1697,9 @@ get_style() { # Toggle visibility of GTK themes. [[ "$gtk2" == "off" ]] && unset gtk2_theme [[ "$gtk3" == "off" ]] && unset gtk3_theme - [[ "$kde" == "off" ]] && unset kde_theme # Format the string based on which themes exist. - if [[ "$gtk2_theme" && "$gtk2_theme" == "$gtk3_theme" ]]; then + if [[ "$gtk2_theme" && "$gtk2_theme" == "$gtk3_theme" ]]; then gtk3_theme+=" [GTK2/3]" unset gtk2_theme @@ -1715,6 +1714,7 @@ get_style() { # Final string. theme="${kde_theme}${gtk2_theme}${gtk3_theme}" + theme="${theme%, }" # Make the output shorter by removing "[GTKX]" from the string. if [[ "$gtk_shorthand" == "on" ]]; then From 71bd30128be0d565dbef93b6d318cd76076a2a09 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 17 Aug 2017 10:33:51 +1000 Subject: [PATCH 115/177] wm_theme: Fix bug when no custom theme is set. --- neofetch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/neofetch b/neofetch index 8619b54f..0d11d3a1 100755 --- a/neofetch +++ b/neofetch @@ -833,6 +833,8 @@ get_wm_theme() { elif [[ -f "$kdebugrc" ]]; then wm_theme="$(awk '/(decoration)/ {gsub(/\[/,"",$1); print $1; exit}' "$kdebugrc")" fi + + wm_theme="${wm_theme/'theme='}" ;; "Quartz Compositor") From ae03a6c800b0cece00961652070706c6dd9943ed Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Thu, 17 Aug 2017 09:59:32 +0200 Subject: [PATCH 116/177] Term: Fix mate-terminal font --- neofetch | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neofetch b/neofetch index a6aa8993..82a2832a 100755 --- a/neofetch +++ b/neofetch @@ -1926,8 +1926,7 @@ get_term_font() { rm -f "$mateterm_config" mate_get() { - gsettings get org.mate.terminal.profile:\ - /org/mate/terminal/profiles/"$1"/ "$2" + gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/"$1"/ "$2" } if [[ "$(mate_get "$profile" "use-system-font")" == "true" ]]; then From ed30d1170a89a94991ae508996c22479fab316ab Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 18 Aug 2017 11:36:23 +1000 Subject: [PATCH 117/177] docs: CHANGELOG --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43d10ad7..3d2f5ad1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,11 @@ - [Linux] Filter out duplicate entries. +**Model** + +- Added support for QEMU/KVM. +- Renamed subtitle to `Host:`. + **Uptime** - [AIX/IRIX] Fixed Neofetch crashing when calculating uptime. @@ -71,10 +76,12 @@ - Added support for LXTerminal. **[@mstraube](https://github.com/mstraube)** - Added support for GNUStep Terminal. **[@mstraube](https://github.com/mstraube)** - Fixed Xfce4-terminal font output when system-wide font is used. **[@mstraube](https://github.com/mstraube)** +- Fixed MATE-Terminal issue. **[@mstraube](https://github.com/mstraube)** **Theme** - [Qt/KDE] Fixed inaccurate theme naming. **[@mstraube](https://github.com/mstraube)** +- [Qt/KDE] GTK theme is now shows as well. **Window Manager** From f3be520826ef02cca30e4f0b91ec0f22fc1b2ba9 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Sun, 20 Aug 2017 13:52:26 +0300 Subject: [PATCH 118/177] Make Makefile more portable - Make PREFIX, SYSCONFDIR overridable - Make MANDIR customizable (for instance, FreeBSD uses $(PREFIX)/man instead of $(PREFIX)/share/man) --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2d6885e4..99ec43b2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ -PREFIX = /usr -SYSCONFDIR = /etc +PREFIX ?= /usr +SYSCONFDIR ?= /etc +MANDIR ?= $(PREFIX)/share/man all: @echo Run \'make install\' to install Neofetch. @@ -8,7 +9,7 @@ install: @echo 'Making directories...' @mkdir -p $(DESTDIR)$(PREFIX)/bin @mkdir -p $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro - @mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 + @mkdir -p $(DESTDIR)$(MANDIR)/man1 @mkdir -p $(DESTDIR)$(SYSCONFDIR)/neofetch @echo 'Installing binaries...' @@ -17,12 +18,12 @@ install: @echo 'Installing ASCII files, man page and config file...' @cp -p ascii/distro/* $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro - @cp -p neofetch.1 $(DESTDIR)$(PREFIX)/share/man/man1 + @cp -p neofetch.1 $(DESTDIR)$(MANDIR)/man1 @cp -p config/config.conf $(DESTDIR)$(SYSCONFDIR)/neofetch/config.conf uninstall: @echo 'Removing files...' @rm -rf $(DESTDIR)$(PREFIX)/bin/neofetch - @rm -rf $(DESTDIR)$(PREFIX)/share/man/man1/neofetch.1* + @rm -rf $(DESTDIR)$(MANDIR)/man1/neofetch.1* @rm -rf $(DESTDIR)$(PREFIX)/share/neofetch @rm -rf $(DESTDIR)$(SYSCONFDIR)/neofetch From 9b92375f88265bf4d27ee83929b733d1c1643fd5 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Fri, 25 Aug 2017 09:55:06 +1000 Subject: [PATCH 119/177] OS: Added support for refracta --- ascii/distro/refracta | 19 +++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 24 insertions(+) create mode 100644 ascii/distro/refracta diff --git a/ascii/distro/refracta b/ascii/distro/refracta new file mode 100644 index 00000000..396474b5 --- /dev/null +++ b/ascii/distro/refracta @@ -0,0 +1,19 @@ +${c2} A + VW + VVW\\ + .yWWW\\ + ,;,,u,;yy;;v;uyyyyyyy ,WWWWW^ + *WWWWWWWWWWWWWWWW/ $VWWWWw , + ^*%WWWWWWVWWX $WWWW** ,yy + , "**WWW/' **' ,yy/WWW*` + &WWWWwy `*` <,ywWW%VWWW* + yWWWWWWWWWW* ., "**WW%W + ,&WWWWWM*"` ,y/ &WWWww ^* + XWWX*^ ,yWWWW09 .WWWWWWWWwy, + *` &WWWWWM WWWWWWWWWWWWWww, + (WWWWW` /#####WWW*********** + ^WWWW + VWW + Wh. + V/ + diff --git a/neofetch b/neofetch index 5034215b..15478476 100755 --- a/neofetch +++ b/neofetch @@ -3548,6 +3548,11 @@ get_distro_colors() { ascii_file="redhat" ;; + "Refracted Devuan"*) + set_colors 8 7 + ascii_file="refracta" + ;; + "Rosa"*) set_colors 4 7 1 ascii_file="rosa" From 2cfdfd34e416f4f5d792b1f9ca87c37c5107df3a Mon Sep 17 00:00:00 2001 From: Sebastian Elisa Pfeifer Date: Fri, 25 Aug 2017 12:16:58 +0200 Subject: [PATCH 120/177] fixed get_battery for device names starting with CMB --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 15478476..2dd6a1b0 100755 --- a/neofetch +++ b/neofetch @@ -2077,7 +2077,7 @@ get_battery() { "Linux") # 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 + for bat in "/sys/class/power_supply/"{BAT,axp288_fuel_gauge,CMB}*; do capacity="$(< "${bat}/capacity")" status="$(< "${bat}/status")" From 916d09a983f2a9c43c463e239dd3930dca2fac46 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Sat, 26 Aug 2017 10:09:53 +1000 Subject: [PATCH 121/177] song: Fix bug with player not being found. --- neofetch | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/neofetch b/neofetch index 2dd6a1b0..9c709147 100755 --- a/neofetch +++ b/neofetch @@ -1408,10 +1408,9 @@ get_memory() { get_song() { 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|pogo/ - {printf $5 " " $6; exit}')" +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|pogo/ {printf $5 " " $6; exit}')" get_song_dbus() { # Multiple players use an almost identical dbus command to get the information. From 5c91ecfe2cafd5120964ee2100c7c8a2876e6804 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Sat, 26 Aug 2017 10:12:22 +1000 Subject: [PATCH 122/177] docs: CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d2f5ad1..a1d11d5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - **[@mstraube](https://github.com/mstraube)** - **[@dominiklohmann](https://github.com/dominiklohmann)** - **[@lexruee](https://github.com/lexruee)** +- **[@deadda7a](https://github.com/deadda7a)** ## General @@ -91,6 +92,11 @@ **Song** - Added support for Pogo. **[@mstraube](https://github.com/mstraube)** +- Fixed bug with players not being found. + +**Battery** + +- Added battery support for Thinkpads and other devices that use the `CMB` naming for batteries. **[@deadda7a](https://github.com/deadda7a)** ## Images From 5a622f8a1804f4bf4672d14d4386c868662102b2 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Sun, 27 Aug 2017 10:33:12 +1000 Subject: [PATCH 123/177] cursor: Fix incorrect cursor position. --- neofetch | 3 --- 1 file changed, 3 deletions(-) diff --git a/neofetch b/neofetch index 9c709147..67ba0391 100755 --- a/neofetch +++ b/neofetch @@ -4008,9 +4008,6 @@ 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 0a1037f16e52ea894819cd7129c49442647e2b10 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Sun, 27 Aug 2017 10:34:29 +1000 Subject: [PATCH 124/177] docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1d11d5f..b474c8a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - This mode prints the information in plain text. - You can use it with `--stdout`. - Example: https://gist.github.com/dylanaraps/151c205322cf3acae62661b76464a3f7 +- Fixed prompt location if color blocks are disabled. ## Operating System From bad43ac17ebe31c1e497fdcc8735db5c008b5bcb Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 28 Aug 2017 09:30:19 +1000 Subject: [PATCH 125/177] scrot: Fix custom command not accepting arguments. --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 neofetch diff --git a/neofetch b/neofetch old mode 100755 new mode 100644 index 67ba0391..4b9acc7e --- a/neofetch +++ b/neofetch @@ -2857,8 +2857,8 @@ scrot_program() { # We first check to see if an X server is running before # falling back to OS specific screenshot tools. if [[ -n "$DISPLAY" ]]; then - if [[ "$scrot_cmd" != "auto" ]] && type -p "$scrot_cmd" >/dev/null; then - scrot_program=("$scrot_cmd") + if [[ "$scrot_cmd" != "auto" ]] && type -p "${scrot_cmd%% *}" >/dev/null; then + scrot_program=($scrot_cmd) elif type -p maim >/dev/null; then scrot_program=(maim) From dce46cd3478a04956161a7f932b5b6fac09448c0 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 28 Aug 2017 09:30:36 +1000 Subject: [PATCH 126/177] general: Fix neofetch perms --- neofetch | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 neofetch diff --git a/neofetch b/neofetch old mode 100644 new mode 100755 From 8f6570f74ae234ad87dc06e0c7bfba6af7d1f95c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 28 Aug 2017 09:35:46 +1000 Subject: [PATCH 127/177] docs: CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b474c8a9..8f0b0bde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - **[@dominiklohmann](https://github.com/dominiklohmann)** - **[@lexruee](https://github.com/lexruee)** - **[@deadda7a](https://github.com/deadda7a)** +- **[@winneon](https://github.com/winneon)** ## General @@ -99,6 +100,11 @@ - Added battery support for Thinkpads and other devices that use the `CMB` naming for batteries. **[@deadda7a](https://github.com/deadda7a)** + ## Images - Fixed division by 0 error in XTerm. + +## Screenshot + +- Fixed `scrot_cmd` arguments not being used. **[@winneon](https://github.com/winneon)** From 076e4bd189caacfb335fd4d5c8d1f8b77e96fade Mon Sep 17 00:00:00 2001 From: dylan araps Date: Mon, 28 Aug 2017 13:38:45 +1000 Subject: [PATCH 128/177] term_font: Fixed font not being found in URxvt if dot was used. --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 4b9acc7e..2d50ae22 100755 --- a/neofetch +++ b/neofetch @@ -1972,7 +1972,7 @@ get_term_font() { ;; "urxvt" | "urxvtd" | "rxvt-unicode" | "xterm") - term_font="$(grep -i -F "${term/d}*font" < <(xrdb -query))" + term_font="$(grep -i "${term/d}\*\.*font" < <(xrdb -query))" term_font="${term_font/*"*font:"}" term_font="$(trim "$term_font")" From 34cd1c8e62275dd60926167a2c30b4bd39e45a14 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Mon, 28 Aug 2017 13:40:09 +1000 Subject: [PATCH 129/177] docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f0b0bde..71a64d86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,6 +80,7 @@ - Added support for GNUStep Terminal. **[@mstraube](https://github.com/mstraube)** - Fixed Xfce4-terminal font output when system-wide font is used. **[@mstraube](https://github.com/mstraube)** - Fixed MATE-Terminal issue. **[@mstraube](https://github.com/mstraube)** +- Fixed URxvt font detection failing if `.` is used. **[@winneon](https://github.com/winneon)** **Theme** From 16c76e9b3a9173df670128ee82195123e7d7552f Mon Sep 17 00:00:00 2001 From: dylan araps Date: Mon, 28 Aug 2017 13:56:39 +1000 Subject: [PATCH 130/177] term_font: Fix missing regex --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 2d50ae22..46454cb1 100755 --- a/neofetch +++ b/neofetch @@ -1974,6 +1974,7 @@ get_term_font() { "urxvt" | "urxvtd" | "rxvt-unicode" | "xterm") term_font="$(grep -i "${term/d}\*\.*font" < <(xrdb -query))" term_font="${term_font/*"*font:"}" + term_font="${term_font/*"*.font:"}" term_font="$(trim "$term_font")" # Xresources has two different font formats, this checks which From ae2f270261226da217eed76b9efaf3310c9c7c0a Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 29 Aug 2017 09:11:53 +1000 Subject: [PATCH 131/177] term_font: Add missing substitution. --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 46454cb1..fe158167 100755 --- a/neofetch +++ b/neofetch @@ -1974,6 +1974,7 @@ get_term_font() { "urxvt" | "urxvtd" | "rxvt-unicode" | "xterm") term_font="$(grep -i "${term/d}\*\.*font" < <(xrdb -query))" term_font="${term_font/*"*font:"}" + term_font="${term_font/*".font:"}" term_font="${term_font/*"*.font:"}" term_font="$(trim "$term_font")" From 7e94fec6fcf9f9f21407f42c17fad82b32cb2bf4 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 29 Aug 2017 09:22:56 +1000 Subject: [PATCH 132/177] gpu_driver: Add linux support. --- config/config.conf | 3 ++- config/travis.conf | 1 + neofetch | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/config/config.conf b/config/config.conf index 64dfd1a3..85162e7c 100644 --- a/config/config.conf +++ b/config/config.conf @@ -26,6 +26,7 @@ print_info() { info "GPU" gpu info "Memory" memory + # info "GPU Driver" gpu_driver # Linux only # info "CPU Usage" cpu_usage # info "Disk" disk # info "Battery" battery @@ -35,7 +36,7 @@ print_info() { # info "Public IP" public_ip # info "Users" users # info "Install Date" install_date - # info "Locale" locale # This only works on glibc systems. + # info "Locale" locale # This only works on glibc systems. info line_break info cols diff --git a/config/travis.conf b/config/travis.conf index 137de46e..0dada093 100644 --- a/config/travis.conf +++ b/config/travis.conf @@ -21,6 +21,7 @@ print_info() { info "Terminal Font" term_font info "CPU" cpu info "GPU" gpu + info "GPU Driver" gpu_driver info "Memory" memory info "CPU Usage" cpu_usage diff --git a/neofetch b/neofetch index fe158167..638f161d 100755 --- a/neofetch +++ b/neofetch @@ -2258,6 +2258,14 @@ get_locale() { locale="$sys_locale" } +get_gpu_driver() { + case "$os" in + "Linux") + gpu_driver="$(lspci -nnk | awk -F ': ' '/VGA/{nr[NR+2]}; NR in nr {print $2}')" + ;; + esac +} + get_cols() { if [[ "$color_blocks" == "on" ]]; then # Convert the width to space chars. From 0ef25b5f804a14777b38286c41bdb1bace883215 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 29 Aug 2017 09:25:01 +1000 Subject: [PATCH 133/177] gpu_driver: Show multiple drivers if multiple gpus found --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 638f161d..a953a60b 100755 --- a/neofetch +++ b/neofetch @@ -2261,7 +2261,8 @@ get_locale() { get_gpu_driver() { case "$os" in "Linux") - gpu_driver="$(lspci -nnk | awk -F ': ' '/VGA/{nr[NR+2]}; NR in nr {print $2}')" + gpu_driver="$(lspci -nnk | awk -F ': ' '/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')" + gpu_driver="${gpu_driver%, }" ;; esac } From 6c347611ecd43c02313c743e03325004110fec62 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 29 Aug 2017 09:34:40 +1000 Subject: [PATCH 134/177] general: Fix line length --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index a953a60b..872554e9 100755 --- a/neofetch +++ b/neofetch @@ -2261,7 +2261,8 @@ get_locale() { get_gpu_driver() { case "$os" in "Linux") - gpu_driver="$(lspci -nnk | awk -F ': ' '/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')" + gpu_driver="$(lspci -nnk | awk -F ': ' \ + '/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')" gpu_driver="${gpu_driver%, }" ;; esac From 0380406733a2db66ff7452995bc616254f8565c9 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 29 Aug 2017 12:43:46 +1000 Subject: [PATCH 135/177] docs: CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71a64d86..98573385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,11 @@ ## Info +**GPU Driver** + +- [Linux] Added a new info function (*off by default*) to display the GPU Driver currently in use. +- Add `info "GPU Driver" gpu_driver` to your config to use it. + **CPU** - [Linux] Fixed inaccurate output on ARM SoC devices. From 814743b31513b61b5b3e0fad90a9fd4e4a84a1b6 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 29 Aug 2017 12:51:00 +1000 Subject: [PATCH 136/177] term_font: Fix URxvt detection when a dot is used. --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 872554e9..4689b9ae 100755 --- a/neofetch +++ b/neofetch @@ -1972,7 +1972,7 @@ get_term_font() { ;; "urxvt" | "urxvtd" | "rxvt-unicode" | "xterm") - term_font="$(grep -i "${term/d}\*\.*font" < <(xrdb -query))" + term_font="$(grep -i "${term/d}\**\.*font" < <(xrdb -query))" term_font="${term_font/*"*font:"}" term_font="${term_font/*".font:"}" term_font="${term_font/*"*.font:"}" From 695145948a689b25ec68a4b45b9f3a05c84567a9 Mon Sep 17 00:00:00 2001 From: Oscar Campos Date: Fri, 8 Sep 2017 15:29:11 +0100 Subject: [PATCH 137/177] updated Artix logo with new official logo --- ascii/distro/artix | 40 ++++++++++++++++++++-------------------- neofetch | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ascii/distro/artix b/ascii/distro/artix index 61ea4cfe..79699ae2 100644 --- a/ascii/distro/artix +++ b/ascii/distro/artix @@ -1,20 +1,20 @@ -${c1} ./odNMMMMMMMMNdo/. - /ymMMMMMMMMMMMMMMMMMMmy/ - .smMMMMMMMNh/MMMM+oNMMMMMMMms. - oNMMMMMMMho` yMMMMy `/hNMMMMMMNo - .mMMMNdho/` yMMMMm` `-ohdNMMMm. - .mMMMMdhs:. yMMMMM. .:shhNMMMm. - mMMMMMMMMMMmy- .hMMMMh` -ohMMMMMMNNMMm -yMMMMsoNMMMMMMMmMMMMMMMMmMMMMMMMNo:NMMMy -MMMMMd -ymMMMMMMMMMMMMMMMMMMNy:` sMMMMM -MMMMMd ./mMMMMMMMMMMMNm/.` dMMMMM -MMMMMd .oMMMMMMMMMMMMNm+:` dMMMMM -MMMMMd :ymMMMMMMMMMMMMMMMMMMNy:` sMMMMM -yMMMMsoNMMMMMMMMNMMMMMNMmMMMMMMMNo:NMMMy - mMMMMMMMMMMms- yMMMMy -ohMMMMMMNNMMm - .mMMMMdho/. yMMMMM. .-ohhNMMMm. - .mMMMMmhs/. yMMMMm` `-ohdNMMMm. - oNMMMMMMMho. sMMMMy `/hNMMMMMMNo - .smMMMMMMMMh/MMMMooNMMMMMMMms. - /ymMMMMMMMMMMMMMMMMMMmy/ - ./odNMMMMMMMMNdo/. + +${c1} d${c2}c. +${c1} x${c2}dc. +${c1} '.${c4}.${c1} d${c2}dlc. +${c1} c${c2}0d:${c1}o${c2}xllc; +${c1} :${c2}0ddlolc,lc, +${c1} :${c1}ko${c4}.${c1}:${c2}0ddollc..dlc. +${c1} ;${c1}K${c2}kxoOddollc' cllc. +${c1} ,${c1}K${c2}kkkxdddllc, ${c4}.${c2}lll: +${c1} ,${c1}X${c2}kkkddddlll;${c3}...';${c1}d${c2}llll${c3}dxk: +${c1} ,${c1}X${c2}kkkddddllll${c3}oxxxddo${c2}lll${c3}oooo, +${c3} xxk${c1}0${c2}kkkdddd${c1}o${c2}lll${c1}o${c3}ooooooolooooc;${c1}. +${c3} ddd${c2}kkk${c1}d${c2}ddd${c1}ol${c2}lc:${c3}:;,'.${c3}... .${c2}lll; +${c1} .${c3}xd${c1}x${c2}kk${c1}xd${c2}dl${c1}'cl:${c4}. ${c2}.llc, +${c1} .${c1}0${c2}kkkxddl${c4}. ${c2};'${c4}. ${c2};llc. +${c1} .${c1}K${c2}Okdcddl${c4}. ${c2}cllc${c4}. +${c1} 0${c2}Okd''dc. .cll; +${c1} k${c2}Okd' .llc, +${c1} d${c2}Od, 'lc. +${c1} :,${c4}. ${c2}... diff --git a/neofetch b/neofetch index 4689b9ae..55c125f9 100755 --- a/neofetch +++ b/neofetch @@ -3130,7 +3130,7 @@ get_distro_colors() { ;; "Artix"*) - set_colors 4 7 + set_colors 6 4 2 7 ascii_file="artix" ;; From 2d2902d361e4935659761047f1dc959669b8fd7b Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 8 Sep 2017 21:41:51 +0700 Subject: [PATCH 138/177] ASCII [artix]: fixed empty line --- ascii/distro/artix | 1 - 1 file changed, 1 deletion(-) diff --git a/ascii/distro/artix b/ascii/distro/artix index 79699ae2..3ac30d3d 100644 --- a/ascii/distro/artix +++ b/ascii/distro/artix @@ -1,4 +1,3 @@ - ${c1} d${c2}c. ${c1} x${c2}dc. ${c1} '.${c4}.${c1} d${c2}dlc. From f0bcf317d8055a580831c3e7a7136f63a35d253d Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Fri, 8 Sep 2017 21:43:08 +0700 Subject: [PATCH 139/177] Docs: changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98573385..a2044847 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - **[@lexruee](https://github.com/lexruee)** - **[@deadda7a](https://github.com/deadda7a)** - **[@winneon](https://github.com/winneon)** +- **[@DamnWidget](https://github.com/DamnWidget)** ## General @@ -22,7 +23,7 @@ - Added support for AryaLinux. **[@mstraube](https://github.com/mstraube)** - Added support for Amazon Linux AMI. -- Added support for Artix Linux. +- Added support for Artix Linux. **[@DamnWidget](https://github.com/DamnWidget)** - Added support for Endless OS. - Added support for Sabotage Linux. - Added support for Siduction. **[@lexruee](https://github.com/lexruee)** From afd8e56d589b8e3167f1b226f6ca64e81e10707e Mon Sep 17 00:00:00 2001 From: chance <29938254+yslgirl@users.noreply.github.com> Date: Sun, 10 Sep 2017 23:46:08 -0600 Subject: [PATCH 140/177] add macOS High Sierra support --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 55c125f9..b596272a 100755 --- a/neofetch +++ b/neofetch @@ -176,6 +176,7 @@ get_distro() { "10.10"*) codename="OS X Yosemite" ;; "10.11"*) codename="OS X El Capitan" ;; "10.12"*) codename="macOS Sierra" ;; + "10.13"*) codename="macOS High Sierra" ;; *) codename="macOS" ;; esac distro="$codename $osx_version $osx_build" @@ -186,7 +187,7 @@ get_distro() { case "$osx_version" in "10."[4-7]*) distro="${distro/${codename}/Mac OS X}" ;; "10."[8-9]* | "10.1"[0-1]*) distro="${distro/${codename}/OS X}" ;; - "10.12"*) distro="${distro/${codename}/macOS}" ;; + "10.1"[2-3]*) distro="${distro/${codename}/macOS}" ;; esac distro="${distro/ ${osx_build}}" ;; From 8d8b2da8903a5c16172bcce0992ff070a15af16a Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Tue, 12 Sep 2017 15:02:13 +0200 Subject: [PATCH 141/177] Font: Fix KDE font, #821 --- neofetch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 55c125f9..ed2e3eaf 100755 --- a/neofetch +++ b/neofetch @@ -1617,7 +1617,12 @@ get_style() { kde_config_file="${kde_config_dir}/kdeglobals" kde_theme="$(grep "^${kde}" "$kde_config_file")" - kde_theme="${kde_theme/${kde}*=}" + kde_theme="${kde_theme/*=}" + if [[ "$kde" == "font" ]]; then + kde_font_size="${kde_theme#*,}" + kde_font_size="${kde_font_size/,*}" + kde_theme="${kde_theme/,*} ${kde_theme/*,} ${kde_font_size}" + fi kde_theme="$(uppercase "$kde_theme") [KDE], " else err "Theme: KDE config files not found, skipping." From d5a15dfae90c1cfce7d87f96cd202d81d2f2dcf6 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Thu, 14 Sep 2017 10:04:11 +1000 Subject: [PATCH 142/177] version: bump --- config/config.conf | 2 +- neofetch | 2 +- neofetch.1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.conf b/config/config.conf index 85162e7c..7152efe4 100644 --- a/config/config.conf +++ b/config/config.conf @@ -729,4 +729,4 @@ stdout="off" # # NOTE: Don't change this value, neofetch reads this to determine # how to handle backwards compatibility. -config_version="3.2.1-git" +config_version="3.3.0" diff --git a/neofetch b/neofetch index 55c125f9..ebc98882 100755 --- a/neofetch +++ b/neofetch @@ -9,7 +9,7 @@ # https://github.com/dylanaraps/ # Neofetch version. -version="3.2.1-git" +version="3.3.0" bash_version="${BASH_VERSION/.*}" sys_locale="${LANG:-C}" diff --git a/neofetch.1 b/neofetch.1 index 74a6e09f..160b9905 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" "August 2017" "Neofetch 3.2.1-git" "User Commands" +.TH NEOFETCH "1" "September 2017" "Neofetch 3.3.0" "User Commands" .SH NAME Neofetch \- A fast, highly customizable system info script .SH SYNOPSIS From c75587db16a327a731f7ff286a8650f5bbdbc00a Mon Sep 17 00:00:00 2001 From: dylan araps Date: Thu, 14 Sep 2017 10:15:15 +1000 Subject: [PATCH 143/177] docs: CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2044847..3f41f143 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ ## Contributors +- **[@konimex](https://github.com/konimex)** - **[@mstraube](https://github.com/mstraube)** - **[@dominiklohmann](https://github.com/dominiklohmann)** +- **[@ybden](https://github.com/ybden)** - **[@lexruee](https://github.com/lexruee)** +- **[@AMDmi3](https://github.com/AMDmi3)** - **[@deadda7a](https://github.com/deadda7a)** - **[@winneon](https://github.com/winneon)** - **[@DamnWidget](https://github.com/DamnWidget)** @@ -17,6 +20,7 @@ - You can use it with `--stdout`. - Example: https://gist.github.com/dylanaraps/151c205322cf3acae62661b76464a3f7 - Fixed prompt location if color blocks are disabled. +- Make makefile more portable. **[@AMDmi3](https://github.com/AMDmi3)** ## Operating System @@ -114,4 +118,5 @@ ## Screenshot +- Use `maim` over `scrot`. **[@ybden](https://github.com/ybden)** - Fixed `scrot_cmd` arguments not being used. **[@winneon](https://github.com/winneon)** From 8493805edaab48032c83a1d858fb6de53c0fa928 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Thu, 14 Sep 2017 10:22:30 +1000 Subject: [PATCH 144/177] docs: New changelog --- CHANGELOG.md | 120 --------------------------------------------------- 1 file changed, 120 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f41f143..e9652019 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,122 +1,2 @@ ## Contributors -- **[@konimex](https://github.com/konimex)** -- **[@mstraube](https://github.com/mstraube)** -- **[@dominiklohmann](https://github.com/dominiklohmann)** -- **[@ybden](https://github.com/ybden)** -- **[@lexruee](https://github.com/lexruee)** -- **[@AMDmi3](https://github.com/AMDmi3)** -- **[@deadda7a](https://github.com/deadda7a)** -- **[@winneon](https://github.com/winneon)** -- **[@DamnWidget](https://github.com/DamnWidget)** - - -## 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. -- `stdout` mode is now reimplemented. - - This mode prints the information in plain text. - - You can use it with `--stdout`. - - Example: https://gist.github.com/dylanaraps/151c205322cf3acae62661b76464a3f7 -- Fixed prompt location if color blocks are disabled. -- Make makefile more portable. **[@AMDmi3](https://github.com/AMDmi3)** - - -## Operating System - -- Added support for AryaLinux. **[@mstraube](https://github.com/mstraube)** -- Added support for Amazon Linux AMI. -- Added support for Artix Linux. **[@DamnWidget](https://github.com/DamnWidget)** -- Added support for Endless OS. -- Added support for Sabotage Linux. -- Added support for Siduction. **[@lexruee](https://github.com/lexruee)** -- Added support for Source Mage. -- Added support for Parsix GNU/Linux. **[@mstraube](https://github.com/mstraube)** -- Added support for Nurunner. **[@mstraube](https://github.com/mstraube)** -- Fixed Raspbian being detected as ChromeOS. - - -## Images - -- [w3m] Fixed w3m-img not found on NixOS. -- Added support for using all image types as input. - - Neofetch now supports `svg`, `tiff` etc. - - -## ASCII - -- Added small Debian. -- Added small FreeBSD. -- Added small macOS. -- Added small NixOS. - - -## Info - -**GPU Driver** - -- [Linux] Added a new info function (*off by default*) to display the GPU Driver currently in use. -- Add `info "GPU Driver" gpu_driver` to your config to use it. - -**CPU** - -- [Linux] Fixed inaccurate output on ARM SoC devices. -- [Linux] Fixed CPU speed not appearing on PowerPC systems. -- [NetBSD] Added support for CPU temperature. (NOTE: This only supports newer Intel processors) -- Fixed inaccurate speed output in systems with CPU speed less than 1 GHz. -- Deprecated `cpu_shorthand` in favor of `cpu_brand`. - -**GPU** - -- [Linux] Filter out duplicate entries. - -**Model** - -- Added support for QEMU/KVM. -- Renamed subtitle to `Host:`. - -**Uptime** - -- [AIX/IRIX] Fixed Neofetch crashing when calculating uptime. - -**Terminal** - -- [SSH] Fixed infinite loop if neofetch is run on non-interactive shells. - -**Terminal Font** - -- Added support for LXTerminal. **[@mstraube](https://github.com/mstraube)** -- Added support for GNUStep Terminal. **[@mstraube](https://github.com/mstraube)** -- Fixed Xfce4-terminal font output when system-wide font is used. **[@mstraube](https://github.com/mstraube)** -- Fixed MATE-Terminal issue. **[@mstraube](https://github.com/mstraube)** -- Fixed URxvt font detection failing if `.` is used. **[@winneon](https://github.com/winneon)** - -**Theme** - -- [Qt/KDE] Fixed inaccurate theme naming. **[@mstraube](https://github.com/mstraube)** -- [Qt/KDE] GTK theme is now shows as well. - -**Window Manager** - -- [macOS] Added support for `chunkwm`. **[@dominiklohmann](https://github.com/dominiklohmann)** -- Fix incorrect output when using WindowMaker. **[@mstraube](https://github.com/mstraube)** - -**Song** - -- Added support for Pogo. **[@mstraube](https://github.com/mstraube)** -- Fixed bug with players not being found. - -**Battery** - -- Added battery support for Thinkpads and other devices that use the `CMB` naming for batteries. **[@deadda7a](https://github.com/deadda7a)** - - -## Images - -- Fixed division by 0 error in XTerm. - -## Screenshot - -- Use `maim` over `scrot`. **[@ybden](https://github.com/ybden)** -- Fixed `scrot_cmd` arguments not being used. **[@winneon](https://github.com/winneon)** From b633ce9a0c3b1b274061cbde93674f1860c680fc Mon Sep 17 00:00:00 2001 From: dylan araps Date: Thu, 14 Sep 2017 10:23:03 +1000 Subject: [PATCH 145/177] version: bump --- config/config.conf | 2 +- neofetch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.conf b/config/config.conf index 7152efe4..e43f89f5 100644 --- a/config/config.conf +++ b/config/config.conf @@ -729,4 +729,4 @@ stdout="off" # # NOTE: Don't change this value, neofetch reads this to determine # how to handle backwards compatibility. -config_version="3.3.0" +config_version="3.3.1-git" diff --git a/neofetch b/neofetch index ebc98882..98a760d6 100755 --- a/neofetch +++ b/neofetch @@ -9,7 +9,7 @@ # https://github.com/dylanaraps/ # Neofetch version. -version="3.3.0" +version="3.3.1-git" bash_version="${BASH_VERSION/.*}" sys_locale="${LANG:-C}" From 15879c8df80be26e049fb2e9e2c1f075cee46ced Mon Sep 17 00:00:00 2001 From: dylan araps Date: Fri, 15 Sep 2017 08:16:51 +1000 Subject: [PATCH 146/177] distro: Fix Gentoo detection error. --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 98a760d6..965ef86d 100755 --- a/neofetch +++ b/neofetch @@ -160,6 +160,7 @@ get_distro() { fi fi distro="$(trim_quotes "$distro")" + distro="${distro/'NAME='}" ;; "Mac OS X") From 8fa1abd0c2f73dacc726628949b7cee25199efff Mon Sep 17 00:00:00 2001 From: dylan araps Date: Sat, 16 Sep 2017 09:18:33 +1000 Subject: [PATCH 147/177] docs: CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9652019..c7cb1023 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,6 @@ ## Contributors + +## OS + +- Fixed detection bug with Gentoo. From eea725b8aa6c6df129914b849c51cb74d4587c35 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 16 Sep 2017 21:17:22 +0200 Subject: [PATCH 148/177] Song: Add support for Elisa --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 965ef86d..ef339bfc 100755 --- a/neofetch +++ b/neofetch @@ -1411,7 +1411,7 @@ get_song() { 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|pogo/ {printf $5 " " $6; exit}')" +guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk|pogo|elisa/ {printf $5 " " $6; exit}')" get_song_dbus() { # Multiple players use an almost identical dbus command to get the information. @@ -1442,6 +1442,7 @@ guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk|pogo/ {printf $5 " " $6; "yarock"*) get_song_dbus "yarock" ;; "deepin-music"*) get_song_dbus "deepinmusic" ;; "tomahawk"*) get_song_dbus "tomahawk" ;; + "elisa"*) get_song_dbus "elisa" ;; "audacious"*) song="$(audtool current-song)" From c1dac903993236760b06c44574fd0f51d014b9eb Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Mon, 18 Sep 2017 14:29:35 +0700 Subject: [PATCH 149/177] Model: Remove more unneeded outputs --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 7999b78f..20ae3720 100755 --- a/neofetch +++ b/neofetch @@ -345,6 +345,7 @@ get_model() { model="${model//Default string}" model="${model//Not Specified}" model="${model//Type1ProductConfigId}" + model="${model//INVALID}" case "$model" in "Standard PC"*) model="KVM/QEMU (${model})" ;; From f03ecddc13339a2c87ac8df1d59b6650866cb166 Mon Sep 17 00:00:00 2001 From: Chris Weeks Date: Thu, 21 Sep 2017 17:56:12 +1200 Subject: [PATCH 150/177] Create coreos logo --- ascii/distro/coreos | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ascii/distro/coreos diff --git a/ascii/distro/coreos b/ascii/distro/coreos new file mode 100644 index 00000000..0f83f2aa --- /dev/null +++ b/ascii/distro/coreos @@ -0,0 +1,20 @@ +${c1} ..... + .';:cccccccc:;'. + ':ccccclc${c3}lllllllll${c1}cc:. + .;cccccccc${c3}lllllllllllllll${c1}c, + ;clllccccc${c3}llllllllllllllllll${c1}c, + .cllclccccc${c3}lllll${c2}lll${c3}llllllllllll${c1}c: + ccclclcccc${c3}cllll${c2}kWMMNKk${c3}llllllllll${c1}c: + :ccclclcccc${c3}llll${c2}oWMMMMMMWO${c3}lllllllll${c1}c, + .ccllllllccc${c3}clll${c2}OMMMMMMMMM0${c3}lllllllll${c1}c + .lllllclcccc${c3}llll${c2}KMMMMMMMMMMo${c3}llllllll${c1}c. + .lllllllcccc${c3}clll${c2}KMMMMMMMMN0${c3}lllllllll${c1}c. + .cclllllcccc${c3}lllld${c2}xkkxxdo${c3}llllllllllc${c1}lc + :cccllllllcccc${c3}lllccllllcclccc${c1}cccccc; + .ccclllllllcccccccc${c3}lll${c1}ccccclccccccc + .cllllllllllclcccclccclccllllcllc + :cllllllllccclcllllllllllllcc; + .cccccccccccccclcccccccccc:. + .;cccclccccccllllllccc,. + .';ccccclllccc:;.. + ..... From cbece346f857a697e1816be0f8881af1b2f28c0e Mon Sep 17 00:00:00 2001 From: Chris Weeks Date: Thu, 21 Sep 2017 18:07:27 +1200 Subject: [PATCH 151/177] Update neofetch --- neofetch | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/neofetch b/neofetch index 20ae3720..8637b161 100755 --- a/neofetch +++ b/neofetch @@ -3202,6 +3202,11 @@ get_distro_colors() { ascii_file="cloveros" ;; + "Container Linux by CoreOS"*) + set_colors 4 7 1 + ascii_file="coreos" + ;; + "crux_small") set_colors 4 5 7 6 ascii_file="crux_small" From 11aa52e08850b6cbc3e72288606bf7f1b393ab9f Mon Sep 17 00:00:00 2001 From: Chris Weeks Date: Fri, 22 Sep 2017 10:28:56 +1200 Subject: [PATCH 152/177] Remove single space on each line of ascii art --- ascii/distro/coreos | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/ascii/distro/coreos b/ascii/distro/coreos index 0f83f2aa..605d5050 100644 --- a/ascii/distro/coreos +++ b/ascii/distro/coreos @@ -1,20 +1,20 @@ -${c1} ..... - .';:cccccccc:;'. - ':ccccclc${c3}lllllllll${c1}cc:. - .;cccccccc${c3}lllllllllllllll${c1}c, - ;clllccccc${c3}llllllllllllllllll${c1}c, - .cllclccccc${c3}lllll${c2}lll${c3}llllllllllll${c1}c: - ccclclcccc${c3}cllll${c2}kWMMNKk${c3}llllllllll${c1}c: - :ccclclcccc${c3}llll${c2}oWMMMMMMWO${c3}lllllllll${c1}c, - .ccllllllccc${c3}clll${c2}OMMMMMMMMM0${c3}lllllllll${c1}c - .lllllclcccc${c3}llll${c2}KMMMMMMMMMMo${c3}llllllll${c1}c. - .lllllllcccc${c3}clll${c2}KMMMMMMMMN0${c3}lllllllll${c1}c. - .cclllllcccc${c3}lllld${c2}xkkxxdo${c3}llllllllllc${c1}lc - :cccllllllcccc${c3}lllccllllcclccc${c1}cccccc; - .ccclllllllcccccccc${c3}lll${c1}ccccclccccccc - .cllllllllllclcccclccclccllllcllc - :cllllllllccclcllllllllllllcc; - .cccccccccccccclcccccccccc:. - .;cccclccccccllllllccc,. - .';ccccclllccc:;.. - ..... +${c1} ..... + .';:cccccccc:;'. + ':ccccclc${c3}lllllllll${c1}cc:. + .;cccccccc${c3}lllllllllllllll${c1}c, + ;clllccccc${c3}llllllllllllllllll${c1}c, + .cllclccccc${c3}lllll${c2}lll${c3}llllllllllll${c1}c: + ccclclcccc${c3}cllll${c2}kWMMNKk${c3}llllllllll${c1}c: + :ccclclcccc${c3}llll${c2}oWMMMMMMWO${c3}lllllllll${c1}c, +.ccllllllccc${c3}clll${c2}OMMMMMMMMM0${c3}lllllllll${c1}c +.lllllclcccc${c3}llll${c2}KMMMMMMMMMMo${c3}llllllll${c1}c. +.lllllllcccc${c3}clll${c2}KMMMMMMMMN0${c3}lllllllll${c1}c. +.cclllllcccc${c3}lllld${c2}xkkxxdo${c3}llllllllllc${c1}lc + :cccllllllcccc${c3}lllccllllcclccc${c1}cccccc; + .ccclllllllcccccccc${c3}lll${c1}ccccclccccccc + .cllllllllllclcccclccclccllllcllc + :cllllllllccclcllllllllllllcc; + .cccccccccccccclcccccccccc:. + .;cccclccccccllllllccc,. + .';ccccclllccc:;.. + ..... From 5caac4a91af7db6ce98ccbee29a62a807e8864f9 Mon Sep 17 00:00:00 2001 From: Tom Hutchings Date: Mon, 25 Sep 2017 18:27:35 +0100 Subject: [PATCH 153/177] tiny fix for WM always being detected as Kwm on macOS --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 8637b161..415bd32d 100755 --- a/neofetch +++ b/neofetch @@ -706,7 +706,7 @@ get_wm() { else case "$os" in "Mac OS X") - ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hunkwm')" + ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hun[k]wm')" case "$ps_line" in *"kwm"*) wm="Kwm" ;; From fd04aa14aefa71f3f4289d4d657418e449fab25a Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Tue, 26 Sep 2017 08:49:21 +0700 Subject: [PATCH 154/177] docs: CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7cb1023..0bd81736 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## Contributors +[**@yslgirl**](https://github.com/yslgirl) + ## OS - Fixed detection bug with Gentoo. +- Added support for macOS High Sierra. [**@yslgirl**](https://github.com/yslgirl) From f9d881e9051a266cc113565213a89165b3ca696a Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 10 Oct 2017 08:29:55 +1100 Subject: [PATCH 155/177] image: Fix bug with getting wallpaper from feh. --- neofetch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 0ce2959d..2fbd6898 100755 --- a/neofetch +++ b/neofetch @@ -2492,7 +2492,9 @@ get_wallpaper() { *) if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then - image="$(awk -F\' '/feh/ {printf $2}' "${HOME}/.fehbg")" + image="$(< "${HOME}/.fehbg")" + image="${image#*\'}" + image="${image%\'*}" elif type -p nitrogen >/dev/null; then image="$(awk -F'=' '/file/ {printf $2;exit;}' \ From b763c31ad73acc297c4cf318e42fd3489c5e347b Mon Sep 17 00:00:00 2001 From: dylan araps Date: Tue, 10 Oct 2017 08:44:09 +1100 Subject: [PATCH 156/177] image: Fix bug with getting wallpaper from feh. --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 2fbd6898..06e36695 100755 --- a/neofetch +++ b/neofetch @@ -2492,7 +2492,7 @@ get_wallpaper() { *) if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then - image="$(< "${HOME}/.fehbg")" + image="$(awk '{print $NF}' "${HOME}/.fehbg")" image="${image#*\'}" image="${image%\'*}" From b57cdee02acecc2a45c388608400c552da28be6e Mon Sep 17 00:00:00 2001 From: dylan araps Date: Wed, 11 Oct 2017 08:49:07 +1100 Subject: [PATCH 157/177] image: Fix bug with getting wallpaper from feh. --- neofetch | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 06e36695..9edd4d10 100755 --- a/neofetch +++ b/neofetch @@ -2492,9 +2492,7 @@ get_wallpaper() { *) if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then - image="$(awk '{print $NF}' "${HOME}/.fehbg")" - image="${image#*\'}" - image="${image%\'*}" + image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")" elif type -p nitrogen >/dev/null; then image="$(awk -F'=' '/file/ {printf $2;exit;}' \ From 952f2e5b2256a4535c43bebccef099dc91a3c0db Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Fri, 13 Oct 2017 14:24:56 +1100 Subject: [PATCH 158/177] fix Install Date for macOS --- neofetch | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 0ce2959d..2614c123 100755 --- a/neofetch +++ b/neofetch @@ -2254,7 +2254,13 @@ get_install_date() { return ;; - *) install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')" ;; + *) + if [[ "$os" == "Mac OS X" ]]; then + install_date="$(ls -dlctuT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')" + else + install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')" + fi + ;; esac install_date="${install_date//-/ }" From 3cac29c804d763352db07e37a996e474d2719240 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Fri, 13 Oct 2017 14:32:58 +1100 Subject: [PATCH 159/177] Change -u to -U in macOS install date --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 2614c123..f578ba7c 100755 --- a/neofetch +++ b/neofetch @@ -2256,7 +2256,7 @@ get_install_date() { *) if [[ "$os" == "Mac OS X" ]]; then - install_date="$(ls -dlctuT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')" + install_date="$(ls -dlctUT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')" else install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')" fi From 123d1652ff0549505acb1f30abbc7d37b7ccb3f1 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Fri, 13 Oct 2017 14:44:22 +1100 Subject: [PATCH 160/177] fix line length to be under 100 chars in macOS install date --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index f578ba7c..2636d8ed 100755 --- a/neofetch +++ b/neofetch @@ -2256,7 +2256,7 @@ get_install_date() { *) if [[ "$os" == "Mac OS X" ]]; then - install_date="$(ls -dlctUT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')" + install_date="$(ls -dlctUT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')" else install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')" fi From 75148f63eeb6ec1f8d0c902d8c26d9f9901c0911 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Fri, 13 Oct 2017 15:08:28 +1100 Subject: [PATCH 161/177] docs: CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bd81736..332793ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ ## Contributors [**@yslgirl**](https://github.com/yslgirl) +[**@iandrewt**](https://github.com/iandrewt) ## OS - Fixed detection bug with Gentoo. - Added support for macOS High Sierra. [**@yslgirl**](https://github.com/yslgirl) +- Fixed Install Date bug with macOS. [**@iandrewt**](https://github.com/iandrewt) From f6c362f5a16b92cb64be2c4cdfa02d49078c0ce3 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 15 Oct 2017 07:21:40 +0700 Subject: [PATCH 162/177] Install Date: Use a separate case for MacOS ls --- neofetch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 77d2ecde..5a3ac83e 100755 --- a/neofetch +++ b/neofetch @@ -2254,12 +2254,12 @@ get_install_date() { return ;; + *"HLOPRSTUWabc"*) # macOS ls + install_date="$(ls -dlctUT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')" + ;; + *) - if [[ "$os" == "Mac OS X" ]]; then - install_date="$(ls -dlctUT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')" - else - install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')" - fi + install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " " $7 " " $8}')" ;; esac From 51ff3d1c8853c58cfc4c56b9f155c68245c0d421 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Sun, 15 Oct 2017 07:26:27 +0700 Subject: [PATCH 163/177] docs: CHANGELOG --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 332793ca..31a6495b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ ## Contributors -[**@yslgirl**](https://github.com/yslgirl) -[**@iandrewt**](https://github.com/iandrewt) +- [**@yslgirl**](https://github.com/yslgirl) +- [**@iandrewt**](https://github.com/iandrewt) +- [**@chrisweeksnz**](https://github.com/chrisweeksnz) ## OS @@ -9,3 +10,4 @@ - Fixed detection bug with Gentoo. - Added support for macOS High Sierra. [**@yslgirl**](https://github.com/yslgirl) - Fixed Install Date bug with macOS. [**@iandrewt**](https://github.com/iandrewt) +- Added support for Container Linux by CoreOS. [**@chrisweeksnz**](https://github.com/chrisweeksnz) From a26fd76ca6a3f466bd4652e4a6150c52cbbf3925 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Mon, 16 Oct 2017 07:42:37 +1100 Subject: [PATCH 164/177] OS: Added support for Lunar Linux. --- ascii/distro/lunar | 13 +++++++++++++ neofetch | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 ascii/distro/lunar diff --git a/ascii/distro/lunar b/ascii/distro/lunar new file mode 100644 index 00000000..26bd295c --- /dev/null +++ b/ascii/distro/lunar @@ -0,0 +1,13 @@ +${c1}`-. `-. + -ohys/-` `:+shy/` + -omNNdyo/` :+shmNNy/` + ${c3} - + /mMmo + hMMMN` + .NMMs + ${c1} -:+oooo+//: ${c3}/MN${c1}. -///oooo+/-` + /:.` ${c3}/${c1} `.:/` +${c3} __ + | | _ _ ___ ___ ___ + | |__| | | | .'| _| + |_____|___|_|_|__,|_| diff --git a/neofetch b/neofetch index 9edd4d10..20dcb0e1 100755 --- a/neofetch +++ b/neofetch @@ -3388,6 +3388,11 @@ get_distro_colors() { ascii_file="lubuntu" ;; + "Lunar"*) + set_colors 4 7 3 + ascii_file="lunar" + ;; + "mac"*"_small") set_colors 2 3 1 5 4 ascii_file="mac_small" From 3217b921e5c57c101b8a07604aae00fab051e6b0 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Tue, 17 Oct 2017 22:47:12 +1100 Subject: [PATCH 165/177] WM: Fix chunkwm being detected as Kwm on macOS --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 4de22a6a..c5135ea4 100755 --- a/neofetch +++ b/neofetch @@ -710,8 +710,8 @@ get_wm() { ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm\|[c]hun[k]wm')" case "$ps_line" in - *"kwm"*) wm="Kwm" ;; *"chunkwm"*) wm="chunkwm" ;; + *"kwm"*) wm="Kwm" ;; *"Amethyst"*) wm="Amethyst" ;; *"Spectacle"*) wm="Spectacle" ;; *) wm="Quartz Compositor" ;; From 468c49efe7322a0d2dedb8501c53582873547bc2 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Tue, 17 Oct 2017 22:51:44 +1100 Subject: [PATCH 166/177] docs: CHANGELOG --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31a6495b..a6baba06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,5 +9,13 @@ - Fixed detection bug with Gentoo. - Added support for macOS High Sierra. [**@yslgirl**](https://github.com/yslgirl) -- Fixed Install Date bug with macOS. [**@iandrewt**](https://github.com/iandrewt) - Added support for Container Linux by CoreOS. [**@chrisweeksnz**](https://github.com/chrisweeksnz) + +## Info + +**Window Manager** + +- [macOS] Fixed chunkwm being detected as Kwm. [**@iandrewt**](https://github.com/iandrewt) + +**Install Date** +- [macOS] Fixed Install Date. [**@iandrewt**](https://github.com/iandrewt) From f7dc4441fc5f12cd0051f60f9cdada6adcdf7d27 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Tue, 17 Oct 2017 23:13:36 +1100 Subject: [PATCH 167/177] gpu_driver: Add macOS (Nvidia) support --- config/config.conf | 2 +- neofetch | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/config.conf b/config/config.conf index e43f89f5..f0d7cdb9 100644 --- a/config/config.conf +++ b/config/config.conf @@ -26,7 +26,7 @@ print_info() { info "GPU" gpu info "Memory" memory - # info "GPU Driver" gpu_driver # Linux only + # info "GPU Driver" gpu_driver # Linux/macOS only # info "CPU Usage" cpu_usage # info "Disk" disk # info "Battery" battery diff --git a/neofetch b/neofetch index c5135ea4..5b561a73 100755 --- a/neofetch +++ b/neofetch @@ -2280,6 +2280,13 @@ get_gpu_driver() { '/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')" gpu_driver="${gpu_driver%, }" ;; + "Mac OS X") + if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then + gpu_driver="Nvidia Web Driver" + else + gpu_driver="macOS Default Graphics Driver" + fi + ;; esac } From 1ab898e94452232d550d5fe500235300d009d735 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Wed, 18 Oct 2017 11:25:27 +1100 Subject: [PATCH 168/177] resolution: Fix errors on non-retina screens [macOS] Added a check to see if the plist file we use for checking the scale factor exists --- neofetch | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 5b561a73..8924c80f 100755 --- a/neofetch +++ b/neofetch @@ -1540,14 +1540,18 @@ get_resolution() { awk '/Resolution:/ {printf $2"x"$4" @ "$6"Hz, "}')" fi - scale_factor="$(PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" \ - /Library/Preferences/com.apple.windowserver.plist)" + if [[ -e "/Library/Preferences/com.apple.windowserver.plist" ]]; then + scale_factor="$(PlistBuddy -c "Print DisplayAnyUserSets:0:0:Resolution" \ + /Library/Preferences/com.apple.windowserver.plist)" + else + scale_factor="" + fi # If no refresh rate is empty. [[ "$resolution" == *"@ Hz"* ]] && \ resolution="${resolution//@ Hz}" - ((${scale_factor%.*} == 2)) && \ + [[ "${scale_factor%.*}" == 2 ]] && \ resolution="${resolution// @/@2x @}" if [[ "$refresh_rate" == "off" ]]; then From 322acffb952600214ddaee2c3c6a709ec3940cf4 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Wed, 18 Oct 2017 11:28:41 +1100 Subject: [PATCH 169/177] docs: CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6baba06..d7bf9400 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,4 +18,9 @@ - [macOS] Fixed chunkwm being detected as Kwm. [**@iandrewt**](https://github.com/iandrewt) **Install Date** + - [macOS] Fixed Install Date. [**@iandrewt**](https://github.com/iandrewt) + +**Resolution** + +- [macOS] Fixed errors on non-retina screens. [**@iandrewt**](https://github.com/iandrewt) From 4f3f0f73c0bae09fad45a37aabb6704f302e3b11 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Wed, 18 Oct 2017 14:37:00 +1100 Subject: [PATCH 170/177] distro: fix whitespace for High Sierra --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 8924c80f..8b981837 100755 --- a/neofetch +++ b/neofetch @@ -177,7 +177,7 @@ get_distro() { "10.10"*) codename="OS X Yosemite" ;; "10.11"*) codename="OS X El Capitan" ;; "10.12"*) codename="macOS Sierra" ;; - "10.13"*) codename="macOS High Sierra" ;; + "10.13"*) codename="macOS High Sierra" ;; *) codename="macOS" ;; esac distro="$codename $osx_version $osx_build" From 434a4d4fb76cfc57813beb0ca351b9146c08befc Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Wed, 18 Oct 2017 14:57:05 +1100 Subject: [PATCH 171/177] model: add new iOS devices --- neofetch | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 8b981837..5c9c5486 100755 --- a/neofetch +++ b/neofetch @@ -279,13 +279,16 @@ get_model() { "iPhone OS") case "$machine_arch" in "iPad1,1") model="iPad" ;; - "iPad2,"[1-4]) model="iPad2" ;; - "iPad3,"[1-3]) model="iPad3" ;; - "iPad3,"[4-6]) model="iPad4" ;; + "iPad2,"[1-4]) model="iPad 2" ;; + "iPad3,"[1-3]) model="iPad 3" ;; + "iPad3,"[4-6]) model="iPad 4" ;; + "iPad6,"[11-12]) model="iPad 5" ;; "iPad4,"[1-3]) model="iPad Air" ;; "iPad5,"[3-4]) model="iPad Air 2" ;; "iPad6,"[7-8]) model="iPad Pro (12.9 Inch)" ;; "iPad6,"[3-4]) model="iPad Pro (9.7 Inch)" ;; + "iPad7,"[1-2]) model="iPad Pro 2 (12.9 Inch)" ;; + "iPad7,"[3-4]) model="iPad Pro (10.5 Inch)" ;; "iPad2,"[5-7]) model="iPad mini" ;; "iPad4,"[4-6]) model="iPad mini 2" ;; "iPad4,"[7-9]) model="iPad mini 3" ;; @@ -306,6 +309,9 @@ get_model() { "iPhone8,4") model="iPhone SE" ;; "iPhone9,1" | "iPhone9,3") model="iPhone 7" ;; "iPhone9,2" | "iPhone9,4") model="iPhone 7 Plus" ;; + "iPhone10,1" | "iPhone10,4") model="iPhone 8" ;; + "iPhone10,2" | "iPhone10,5") model="iPhone 8 Plus" ;; + "iPhone10,3" | "iPhone10,6") model="iPhone X" ;; "iPod1,1") model="iPod touch" ;; "ipod2,1") model="iPod touch 2G" ;; From 87140464fcaf2cc762a456302c2965f420501ba8 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Wed, 18 Oct 2017 14:58:37 +1100 Subject: [PATCH 172/177] docs: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7bf9400..560033d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Fixed detection bug with Gentoo. - Added support for macOS High Sierra. [**@yslgirl**](https://github.com/yslgirl) - Added support for Container Linux by CoreOS. [**@chrisweeksnz**](https://github.com/chrisweeksnz) +- Added support for 2017 iOS devices [**@iandrewt**](https://github.com/iandrewt) ## Info From 402ac0bc00ae72fe31760fabff79f4e242a8c262 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Wed, 18 Oct 2017 16:17:52 +1100 Subject: [PATCH 173/177] model: fix SC2102 on iPad --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 5c9c5486..9e66c4bc 100755 --- a/neofetch +++ b/neofetch @@ -282,7 +282,7 @@ get_model() { "iPad2,"[1-4]) model="iPad 2" ;; "iPad3,"[1-3]) model="iPad 3" ;; "iPad3,"[4-6]) model="iPad 4" ;; - "iPad6,"[11-12]) model="iPad 5" ;; + "iPad6,11" | "iPad 6,12") model="iPad 5" ;; "iPad4,"[1-3]) model="iPad Air" ;; "iPad5,"[3-4]) model="iPad Air 2" ;; "iPad6,"[7-8]) model="iPad Pro (12.9 Inch)" ;; From 857cbb21b48375b437ca7164238cf877f6502d05 Mon Sep 17 00:00:00 2001 From: natemaia Date: Thu, 26 Oct 2017 02:01:55 -0700 Subject: [PATCH 174/177] Update archlabs distro ascii art --- ascii/distro/archlabs | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/ascii/distro/archlabs b/ascii/distro/archlabs index 8e0b840e..74f8a026 100644 --- a/ascii/distro/archlabs +++ b/ascii/distro/archlabs @@ -1,18 +1,21 @@ -${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 -arc y\\. +${c1} 'c' + 'kKk, + .dKKKx. + .oKXKXKd. + .l0XXXXKKo. + c0KXXXXKX0l. + :0XKKOxxOKX0l. + :OXKOc. .c0XX0l. + :OK0o. ${c4}...${c1}'dKKX0l. + :OX0c ${c4};xOx'${c1}'dKXX0l. + :0KKo.${c4}.o0XXKd'.${c1}lKXX0l. + c0XKd.${c4}.oKXXXXKd..${c1}oKKX0l. + .c0XKk;${c4}.l0K0OO0XKd..${c1}oKXXKo. + .l0XXXk:${c4},dKx,.'l0XKo.${c1}.kXXXKo. + .o0XXXX0d,${c4}:x; .oKKx'${c1}.dXKXXKd. + .oKXXXXKK0c.${c4};. :00c'${c1}cOXXXXXKd. + .dKXXXXXXXXk,${c4}. cKx'${c1}'xKXXXXXXKx' + 'xKXXXXK0kdl:. ${c4}.ok; ${c1}.cdk0KKXXXKx' + 'xKK0koc,.. ${c4}'c, ${c1} ..,cok0KKk, + ,xko:'. ${c4}.. ${c1} .':okx; + .,'. .',. From 98e2a0db99046f8e7163061be90f1eaf37fbdf34 Mon Sep 17 00:00:00 2001 From: Jesse Liles Date: Thu, 2 Nov 2017 16:13:55 -0400 Subject: [PATCH 175/177] Added Pop\!_OS distribution --- ascii/distro/pop_os | 21 +++++++++++++++++++++ neofetch | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 ascii/distro/pop_os diff --git a/ascii/distro/pop_os b/ascii/distro/pop_os new file mode 100644 index 00000000..a399f18f --- /dev/null +++ b/ascii/distro/pop_os @@ -0,0 +1,21 @@ +${c1} ///////////// + ///////////////////// + ///////${c2}*767${c1}//////////////// + //////${c2}7676767676*${c1}////////////// + /////${c2}76767${c1}//${c2}7676767${c1}////////////// + /////${c2}767676${c1}///${c2}*76767${c1}/////////////// + ///////${c2}767676${c1}///${c2}76767${c1}.///${c2}7676*${c1}/////// +/////////${c2}767676${c1}//${c2}76767${c1}///${c2}767676${c1}//////// +//////////${c2}76767676767${c1}////${c2}76767${c1}///////// +///////////${c2}76767676${c1}//////${c2}7676${c1}////////// +////////////,${c2}7676${c1},///////${c2}767${c1}/////////// +/////////////*${c2}7676${c1}///////${c2}76${c1}//////////// +///////////////${c2}7676${c1}//////////////////// + ///////////////${c2}7676${c1}///${c2}767${c1}//////////// + //////////////////////${c2}'${c1}//////////// + //////${c2}.7676767676767676767,${c1}////// + /////${c2}767676767676767676767${c1}///// + /////////////////////////// + ///////////////////// + ///////////// + diff --git a/neofetch b/neofetch index 9e66c4bc..11eccc98 100755 --- a/neofetch +++ b/neofetch @@ -3571,6 +3571,11 @@ get_distro_colors() { ascii_file="peppermint" ;; + "Pop!_OS"*) + set_colors 6 7 + ascii_file="pop_os" + ;; + "Porteus"*) set_colors 6 7 ascii_file="porteus" From 498991b106e83d08348a211acdfe8f90c5a6ac2b Mon Sep 17 00:00:00 2001 From: Maulik Mistry Date: Fri, 3 Nov 2017 02:26:31 -0700 Subject: [PATCH 176/177] Added color updates for Kubuntu logo. --- ascii/distro/kubuntu | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ascii/distro/kubuntu b/ascii/distro/kubuntu index 3f7126c1..6302ff0f 100644 --- a/ascii/distro/kubuntu +++ b/ascii/distro/kubuntu @@ -1,20 +1,20 @@ ${c1} `.:/ossyyyysso/:. .:oyyyyyyyyyyyyyyyyyyo:` - -oyyyyyyyo-``/yyyyyyysyyyyo- - -syyyyyyyyyy` +yyyy/` `/yyyys- - +yyys/./syyyy: ..-` /yyyyyy+ - `oyyyy: `:syys+oooo+:. .yyyyyyyyo` - +yyyyyy/ `/yyyyyyyyyyys/` /sssssyyy+ --yyyyyyyy- -syyyyyyyyyyyyyys- syyy- -oyyyyso+: .yyyyyyyyyyyyyyyyyy. `.+yyyo -yyys /yyyyyyyyyyyyyyyyyysosyyyyyyyy -yyys.` /yyyyyyyyyyyyyyyyyyyyyyyyyyyyy -oyyyyyso: .yyyyyyyyyyyyyyyyyy.`.-:/syyyo --yyyyyyyy. -syyyyyyyyyyyyyys- syyy- - +yyyyyy: `syyyyyyyyyyys/` /o+++oyyy+ - `oyyyy. -syyy++oooo+/. oyyyyyyyyo - +yyys/-oyyyys` `..` -yyyyyyy+ - -syyyyyyyyy: .syyy/` `syyyys- - -oyyyyyyy:.`-yyyyyys+syyyyo- + -oyyyyyyyo${c2}dMMy${c1}yyyyyyysyyyyo- + -syyyyyyyyyy${c2}dMMy${c1}oyyyy${c2}dmMMy${c1}yyyys- + oyyys${c2}dMy${c1}syyyy${c2}dMMMMMMMMMMMMMy${c1}yyyyyyo + `oyyyy${c2}dMMMMy${c1}syysoooooo${c2}dMMMMy${c1}yyyyyyyyo` + oyyyyyy${c2}dMMMMy${c1}yyyyyyyyyyys${c2}dMMy${c1}sssssyyyo +-yyyyyyyy${c2}dMy${c1}syyyyyyyyyyyyyys${c2}dMMMMMy${c1}syyy- +oyyyysoo${c2}dMy${c1}yyyyyyyyyyyyyyyyyy${c2}dMMMMy${c1}syyyo +yyys${c2}dMMMMMy${c1}yyyyyyyyyyyyyyyyyysosyyyyyyyy +yyys${c2}dMMMMMy${c1}yyyyyyyyyyyyyyyyyyyyyyyyyyyyy +oyyyyysos${c2}dy${c1}yyyyyyyyyyyyyyyyyy${c2}dMMMMy${c1}syyyo +-yyyyyyyy${c2}dMy${c1}syyyyyyyyyyyyyys${c2}dMMMMMy${c1}syyy- + oyyyyyy${c2}dMMMy${c1}syyyyyyyyyyys${c2}dMMy${c1}oyyyoyyyo + `oyyyy${c2}dMMMy${c1}syyyoooooo${c2}dMMMMy${c1}oyyyyyyyyo + oyyysyyoyyyys${c2}dMMMMMMMMMMMy${c1}yyyyyyyo + -syyyyyyyyy${c2}dMMMy${c1}syyy${c2}dMMMy${c1}syyyys- + -oyyyyyyy${c2}dMMy${c1}yyyyyysosyyyyo- ./oyyyyyyyyyyyyyyyyyyo/. `.:/oosyyyysso/:.` From d21f9e928dc62bd32a8aba835f78f84d4ef4cbb4 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Wed, 8 Nov 2017 07:20:25 +1100 Subject: [PATCH 177/177] model: Fix garbage --- neofetch | 1 + 1 file changed, 1 insertion(+) diff --git a/neofetch b/neofetch index 9e66c4bc..f2546c77 100755 --- a/neofetch +++ b/neofetch @@ -353,6 +353,7 @@ get_model() { model="${model//Not Specified}" model="${model//Type1ProductConfigId}" model="${model//INVALID}" + model="${model//�}" case "$model" in "Standard PC"*) model="KVM/QEMU (${model})" ;;