mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 01:00:17 +00:00
Compare commits
42 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c902c2d69e | ||
|
efa9ff6726 | ||
|
0e59d6c041 | ||
|
8e29cd00b3 | ||
|
f2300d3306 | ||
|
77596ea868 | ||
|
11a2adc8ed | ||
|
aaabb9c3c0 | ||
|
6e20dfe759 | ||
|
2e5384581f | ||
|
e4224c4f77 | ||
|
4870a863ac | ||
|
9ad9d4d75e | ||
|
80a34bdf28 | ||
|
a9df517fd4 | ||
|
6711ebc91f | ||
|
8762403de9 | ||
|
a2290b7398 | ||
|
9f263fe184 | ||
|
c5c4f901ba | ||
|
9b5d75907b | ||
|
ed05c6460b | ||
|
7fc4f84217 | ||
|
c43ffb028e | ||
|
8540a2f1e3 | ||
|
db21981373 | ||
|
ca49b178fe | ||
|
1e8f12dd4a | ||
|
39cda4f29f | ||
|
ed99973989 | ||
|
fe9933f544 | ||
|
045577653c | ||
|
c3d47ece7d | ||
|
23340e29c3 | ||
|
fe057a157b | ||
|
f8c2bc2573 | ||
|
bb4bc945be | ||
|
acdd75220e | ||
|
a1e6843884 | ||
|
63df9687db | ||
|
744dd46330 | ||
|
dd8ee366b1 |
68
CHANGELOG.md
68
CHANGELOG.md
@@ -3,25 +3,89 @@
|
|||||||
- [**@yslgirl**](https://github.com/yslgirl)
|
- [**@yslgirl**](https://github.com/yslgirl)
|
||||||
- [**@iandrewt**](https://github.com/iandrewt)
|
- [**@iandrewt**](https://github.com/iandrewt)
|
||||||
- [**@chrisweeksnz**](https://github.com/chrisweeksnz)
|
- [**@chrisweeksnz**](https://github.com/chrisweeksnz)
|
||||||
|
- [**@dawidd6**](https://github.com/dawidd6)
|
||||||
|
- [**@MitchWeaver**](https://github.com/MitchWeaver)
|
||||||
|
- [**@StarryTony**](https://github.com/StarryTony)
|
||||||
|
|
||||||
|
|
||||||
## OS
|
## OS
|
||||||
|
|
||||||
- Fixed detection bug with Gentoo.
|
- Fixed detection bug with Gentoo.
|
||||||
|
- Fixed detection bug with TrueOS. [**@dawidd6**](https://github.com/dawidd6)
|
||||||
- Added support for macOS High Sierra. [**@yslgirl**](https://github.com/yslgirl)
|
- 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 Container Linux by CoreOS. [**@chrisweeksnz**](https://github.com/chrisweeksnz)
|
||||||
- Added support for 2017 iOS devices [**@iandrewt**](https://github.com/iandrewt)
|
- Added support for 2017 iOS devices. [**@iandrewt**](https://github.com/iandrewt)
|
||||||
|
- Added support for LEDE. [**@dawidd6**](https://github.com/dawidd6)
|
||||||
|
- Added support for Pop!\_OS. [**@jliles**](https://github.com/jliles)
|
||||||
|
- Added support for Lunar Linux.
|
||||||
|
|
||||||
|
|
||||||
|
## General
|
||||||
|
|
||||||
|
- Added more info to verbose mode for debugging.
|
||||||
|
- Fixed bug in prompt location calculation.
|
||||||
|
|
||||||
|
|
||||||
|
## Ascii
|
||||||
|
|
||||||
|
- Added color updates for Kubuntu logo. **Maulik Mistry**
|
||||||
|
|
||||||
|
|
||||||
|
## Images
|
||||||
|
|
||||||
|
- [MacOS/iTerm2] Fixed thumbnail not appearing. [**@StarryTony**](https://github.com/StarryTony)
|
||||||
|
- Fixed bug with getting wallpaper from feh.
|
||||||
|
- Added `pixterm` backend.
|
||||||
|
|
||||||
## Info
|
## Info
|
||||||
|
|
||||||
|
**Desktop Environment**
|
||||||
|
|
||||||
|
- Added GNOME version.
|
||||||
|
|
||||||
**Window Manager**
|
**Window Manager**
|
||||||
|
|
||||||
- [macOS] Fixed chunkwm being detected as Kwm. [**@iandrewt**](https://github.com/iandrewt)
|
- Added support for most (*if not all*) current Wayland compositors/window manager's.
|
||||||
|
- [macOS] Fixed `chunkwm` being detected as `Kwm`. [**@iandrewt**](https://github.com/iandrewt)
|
||||||
|
|
||||||
|
**Window Manager Theme**
|
||||||
|
|
||||||
|
- Fixed `sawfish` detection.
|
||||||
|
|
||||||
**Install Date**
|
**Install Date**
|
||||||
|
|
||||||
- [macOS] Fixed Install Date. [**@iandrewt**](https://github.com/iandrewt)
|
- [macOS] Fixed Install Date. [**@iandrewt**](https://github.com/iandrewt)
|
||||||
|
|
||||||
|
**Theme**
|
||||||
|
|
||||||
|
- Fixed KDE font issue. [**@mstraube**](https://github.com/mstraube)
|
||||||
|
|
||||||
|
**CPU**
|
||||||
|
|
||||||
|
- [linux] Detect the correct temperature file to use.
|
||||||
|
- [windows] Removed `$temp` usage as it's an envar.
|
||||||
|
|
||||||
|
**GPU**
|
||||||
|
|
||||||
|
- [linux] Added driver version to NVIDIA output.
|
||||||
|
- [macOS] Added NVIDIA support. [**@iandrewt**](https://github.com/iandrewt)
|
||||||
|
|
||||||
|
**Package Manager**
|
||||||
|
|
||||||
|
- Added detection for Sabotage Linux's `butch` [**@MitchWeaver**](https://github.com/MitchWeaver)
|
||||||
|
|
||||||
**Resolution**
|
**Resolution**
|
||||||
|
|
||||||
- [macOS] Fixed errors on non-retina screens. [**@iandrewt**](https://github.com/iandrewt)
|
- [macOS] Fixed errors on non-retina screens. [**@iandrewt**](https://github.com/iandrewt)
|
||||||
|
|
||||||
|
**Song**
|
||||||
|
|
||||||
|
- Added support for Elisa. [**@mstraube**](https://github.com/mstraube)
|
||||||
|
|
||||||
|
**Model**
|
||||||
|
|
||||||
|
- Remove more unneeded outputs. [**@konimex**](https://github.com/konimex)
|
||||||
|
|
||||||
|
**Disk**
|
||||||
|
|
||||||
|
- Update Haiku's detection. [**@dawidd6**](https://github.com/dawidd6)
|
||||||
|
9
ascii/distro/lede
Normal file
9
ascii/distro/lede
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
${c1} _________
|
||||||
|
/ /\
|
||||||
|
/ LE / \
|
||||||
|
/ DE / \
|
||||||
|
/________/ LE \
|
||||||
|
\ \ DE /
|
||||||
|
\ LE \ /
|
||||||
|
\ DE \ /
|
||||||
|
\________\/
|
@@ -543,7 +543,7 @@ disk_display="off"
|
|||||||
# Image backend.
|
# Image backend.
|
||||||
#
|
#
|
||||||
# Default: 'ascii'
|
# Default: 'ascii'
|
||||||
# Values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'tycat', 'w3m'
|
# Values: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2', 'off', 'termpix', 'pixterm', 'tycat', 'w3m'
|
||||||
# Flag: --backend
|
# Flag: --backend
|
||||||
image_backend="ascii"
|
image_backend="ascii"
|
||||||
|
|
||||||
|
224
neofetch
224
neofetch
@@ -44,7 +44,6 @@ get_os() {
|
|||||||
"MINIX") os="MINIX" ;;
|
"MINIX") os="MINIX" ;;
|
||||||
"AIX") os="AIX" ;;
|
"AIX") os="AIX" ;;
|
||||||
"IRIX64") os="IRIX" ;;
|
"IRIX64") os="IRIX" ;;
|
||||||
"HP-UX") os="HP-UX" ;;
|
|
||||||
*)
|
*)
|
||||||
printf "%s\n" "Unknown OS detected: '$kernel_name', aborting..." >&2
|
printf "%s\n" "Unknown OS detected: '$kernel_name', aborting..." >&2
|
||||||
printf "%s\n" "Open an issue on GitHub to add support for your OS." >&2
|
printf "%s\n" "Open an issue on GitHub to add support for your OS." >&2
|
||||||
@@ -115,7 +114,8 @@ get_distro() {
|
|||||||
elif type -p tazpkg >/dev/null; then
|
elif type -p tazpkg >/dev/null; then
|
||||||
distro="SliTaz $(< /etc/slitaz-release)"
|
distro="SliTaz $(< /etc/slitaz-release)"
|
||||||
|
|
||||||
elif type -p kpm > /dev/null; then
|
elif type -p kpt >/dev/null && \
|
||||||
|
type -p kpm >/dev/null; then
|
||||||
distro="KSLinux"
|
distro="KSLinux"
|
||||||
|
|
||||||
elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then
|
elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then
|
||||||
@@ -154,7 +154,7 @@ get_distro() {
|
|||||||
|
|
||||||
# Workarounds for FreeBSD based distros.
|
# Workarounds for FreeBSD based distros.
|
||||||
[[ -f "/etc/pcbsd-lang" ]] && distro="PCBSD"
|
[[ -f "/etc/pcbsd-lang" ]] && distro="PCBSD"
|
||||||
[[ -f "/etc/rc.conf.trueos" ]] && distro="TrueOS"
|
[[ -f "/etc/trueos-lang" ]] && distro="TrueOS"
|
||||||
|
|
||||||
# /etc/pacbsd-release is an empty file
|
# /etc/pacbsd-release is an empty file
|
||||||
[[ -f "/etc/pacbsd-release" ]] && distro="PacBSD"
|
[[ -f "/etc/pacbsd-release" ]] && distro="PacBSD"
|
||||||
@@ -227,11 +227,8 @@ get_distro() {
|
|||||||
distro="AIX $(oslevel)"
|
distro="AIX $(oslevel)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"IRIX" | "HP-UX")
|
"IRIX")
|
||||||
distro="$os ${kernel_version}"
|
distro="IRIX ${kernel_version}"
|
||||||
case "$distro_shorthand" in
|
|
||||||
"on" | "tiny") distro="${distro/ ${kernel_version}}" ;;
|
|
||||||
esac
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -343,10 +340,6 @@ get_model() {
|
|||||||
"AIX")
|
"AIX")
|
||||||
model="$(/usr/bin/uname -M)"
|
model="$(/usr/bin/uname -M)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"HP-UX")
|
|
||||||
model="$(model)"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Remove dummy OEM info.
|
# Remove dummy OEM info.
|
||||||
@@ -376,8 +369,8 @@ get_title() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get_kernel() {
|
get_kernel() {
|
||||||
# Since AIX has no useful output in uname, it's better to skip this function altogether
|
# Since these OS are integrated systems, it's better to skip this function altogether
|
||||||
[[ "$os" == "AIX" ]] && return
|
[[ "$os" =~ (AIX|IRIX) ]] && return
|
||||||
|
|
||||||
case "$kernel_shorthand" in
|
case "$kernel_shorthand" in
|
||||||
"on") kernel="$kernel_version" ;;
|
"on") kernel="$kernel_version" ;;
|
||||||
@@ -385,7 +378,7 @@ get_kernel() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Hide kernel info if it's identical to the distro info.
|
# Hide kernel info if it's identical to the distro info.
|
||||||
if [[ "$os" =~ (BSD|MINIX|IRIX|HP-UX) && "$distro" == *"$kernel_name"* ]]; then
|
if [[ "$os" =~ (BSD|MINIX) && "$distro" == *"$kernel_name"* ]]; then
|
||||||
case "$distro_shorthand" in
|
case "$distro_shorthand" in
|
||||||
"on" | "tiny") kernel="$kernel_version" ;;
|
"on" | "tiny") kernel="$kernel_version" ;;
|
||||||
*) unset kernel ;;
|
*) unset kernel ;;
|
||||||
@@ -425,8 +418,8 @@ get_uptime() {
|
|||||||
seconds="${seconds/.*}"
|
seconds="${seconds/.*}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"AIX" | "IRIX" | "HP-UX")
|
"AIX" | "IRIX")
|
||||||
t="$(LC_ALL=POSIX UNIX95=1 ps -o etime= -p 1)"
|
t="$(LC_ALL=POSIX ps -o etime= -p 1)"
|
||||||
d="0" h="0"
|
d="0" h="0"
|
||||||
case "$t" in *"-"*) d="${t%%-*}"; t="${t#*-}";; esac
|
case "$t" in *"-"*) d="${t%%-*}"; t="${t#*-}";; esac
|
||||||
case "$t" in *":"*":"*) h="${t%%:*}"; t="${t#*:}";; esac
|
case "$t" in *":"*":"*) h="${t%%:*}"; t="${t#*:}";; esac
|
||||||
@@ -495,9 +488,6 @@ get_packages() {
|
|||||||
type -p dpkg >/dev/null && \
|
type -p dpkg >/dev/null && \
|
||||||
packages="$((packages+=$(dpkg --get-selections | grep -cv deinstall$)))"
|
packages="$((packages+=$(dpkg --get-selections | grep -cv deinstall$)))"
|
||||||
|
|
||||||
type -p kpm >/dev/null && \
|
|
||||||
packages="$((packages+=$(kpm --get-selections | grep -cv deinstall$)))"
|
|
||||||
|
|
||||||
type -p pkgtool >/dev/null && \
|
type -p pkgtool >/dev/null && \
|
||||||
packages="$((packages+=$(ls -1 /var/log/packages | wc -l)))"
|
packages="$((packages+=$(ls -1 /var/log/packages | wc -l)))"
|
||||||
|
|
||||||
@@ -555,11 +545,18 @@ get_packages() {
|
|||||||
type -p alps >/dev/null && \
|
type -p alps >/dev/null && \
|
||||||
packages="$((packages+=$(alps showinstalled | wc -l)))"
|
packages="$((packages+=$(alps showinstalled | wc -l)))"
|
||||||
|
|
||||||
|
type -p kpt >/dev/null && \
|
||||||
|
type -p kpm >/dev/null && \
|
||||||
|
packages="$((packages+=$(kpm --get-selections | grep -cv deinstall$)))"
|
||||||
|
|
||||||
if type -p cave >/dev/null; then
|
if type -p cave >/dev/null; then
|
||||||
package_dir=(/var/db/paludis/repositories/{cross-installed,installed}/*/data/*)
|
package_dir=(/var/db/paludis/repositories/{cross-installed,installed}/*/data/*)
|
||||||
packages="$((packages+=$(ls -d -1 "${package_dir[@]}" | wc -l)))"
|
packages="$((packages+=$(ls -d -1 "${package_dir[@]}" | wc -l)))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
type -p butch >/dev/null && \
|
||||||
|
packages="$((packages+=$(butch list | wc -l)))"
|
||||||
|
|
||||||
if type -p pkg >/dev/null; then
|
if type -p pkg >/dev/null; then
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;;
|
"FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;;
|
||||||
@@ -607,10 +604,6 @@ get_packages() {
|
|||||||
"IRIX")
|
"IRIX")
|
||||||
packages="$(($(versions -b | wc -l)-3))"
|
packages="$(($(versions -b | wc -l)-3))"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"HP-UX")
|
|
||||||
packages="$(($(swlist -l product | wc -l)-6))"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
((packages == 0)) && unset packages
|
((packages == 0)) && unset packages
|
||||||
@@ -675,6 +668,9 @@ get_de() {
|
|||||||
|
|
||||||
elif [[ "$MATE_DESKTOP_SESSION_ID" ]]; then
|
elif [[ "$MATE_DESKTOP_SESSION_ID" ]]; then
|
||||||
de="MATE"
|
de="MATE"
|
||||||
|
|
||||||
|
elif [[ "$TDE_FULL_SESSION" ]]; then
|
||||||
|
de="Trinity"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# When a window manager is started from a display manager
|
# When a window manager is started from a display manager
|
||||||
@@ -686,18 +682,21 @@ get_de() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Fallback to using xprop.
|
# Fallback to using xprop.
|
||||||
[[ -n "$DISPLAY" && -z "$de" ]] && \
|
[[ "$DISPLAY" && -z "$de" ]] && \
|
||||||
de="$(xprop -root | awk '/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/')"
|
de="$(xprop -root | awk '/KDE_SESSION_VERSION|^_MUFFIN|xfce4|xfce5/')"
|
||||||
|
|
||||||
# Format strings.
|
# Format strings.
|
||||||
case "$de" in
|
case "$de" in
|
||||||
"KDE_SESSION_VERSION"*) de="KDE${de/* = }" ;;
|
"KDE_SESSION_VERSION"*) de="KDE${de/* = }" ;;
|
||||||
*"TDE_FULL_SESSION"*) de="Trinity" ;;
|
|
||||||
*"MUFFIN"* | "Cinnamon") de="$(cinnamon --version)"; de="${de:-Cinnamon}" ;;
|
*"MUFFIN"* | "Cinnamon") de="$(cinnamon --version)"; de="${de:-Cinnamon}" ;;
|
||||||
*"xfce4"*) de="Xfce4" ;;
|
*"xfce4"*) de="Xfce4" ;;
|
||||||
*"xfce5"*) de="Xfce5" ;;
|
*"xfce5"*) de="Xfce5" ;;
|
||||||
*"xfce"*) de="Xfce" ;;
|
*"xfce"*) de="Xfce" ;;
|
||||||
*"mate"*) de="MATE" ;;
|
*"mate"*) de="MATE" ;;
|
||||||
|
*"GNOME"*)
|
||||||
|
de="$(gnome-shell --version)"
|
||||||
|
de="${de/Shell }"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Log that the function was run.
|
# Log that the function was run.
|
||||||
@@ -708,21 +707,37 @@ get_wm() {
|
|||||||
# If function was run, stop here.
|
# If function was run, stop here.
|
||||||
((wm_run == 1)) && return
|
((wm_run == 1)) && return
|
||||||
|
|
||||||
if [[ -n "$DISPLAY" && "$os" != "Mac OS X" ]]; then
|
if [[ "$WAYLAND_DISPLAY" ]]; then
|
||||||
|
wm="$(ps -e | grep -m 1 -o -F \
|
||||||
|
-e "asc" \
|
||||||
|
-e "fireplace" \
|
||||||
|
-e "grefsen" \
|
||||||
|
-e "mazecompositor" \
|
||||||
|
-e "maynard" \
|
||||||
|
-e "motorcar" \
|
||||||
|
-e "orbment" \
|
||||||
|
-e "orbital" \
|
||||||
|
-e "perceptia" \
|
||||||
|
-e "rustland" \
|
||||||
|
-e "sway" \
|
||||||
|
-e "velox" \
|
||||||
|
-e "wavy" \
|
||||||
|
-e "wayhouse" \
|
||||||
|
-e "way-cooler" \
|
||||||
|
-e "westford" \
|
||||||
|
-e "weston")"
|
||||||
|
|
||||||
|
elif [[ "$DISPLAY" && "$os" != "Mac OS X" ]]; then
|
||||||
id="$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)"
|
id="$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)"
|
||||||
id="${id##* }"
|
id="${id##* }"
|
||||||
wm="$(xprop -id "$id" -notype -len 100 -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_NAME = }"
|
||||||
wm="${wm/\"}"
|
wm="${wm/\"}"
|
||||||
wm="${wm/\"*}"
|
wm="${wm/\"*}"
|
||||||
|
|
||||||
# Window Maker does not set _NET_WM_NAME
|
# Window Maker does not set _NET_WM_NAME
|
||||||
[[ "$wm" =~ "WINDOWMAKER" ]] && wm="wmaker"
|
[[ "$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")"
|
|
||||||
|
|
||||||
else
|
else
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
@@ -738,11 +753,13 @@ get_wm() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
wm="$(tasklist | grep -m 1 -o -F -e "bugn" \
|
wm="$(tasklist | grep -m 1 -o -F \
|
||||||
-e "Windawesome" \
|
-e "bugn" \
|
||||||
-e "blackbox" \
|
-e "Windawesome" \
|
||||||
-e "emerge" \
|
-e "blackbox" \
|
||||||
-e "litestep")"
|
-e "emerge" \
|
||||||
|
-e "litestep")"
|
||||||
|
|
||||||
[[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)"
|
[[ "$wm" == "blackbox" ]] && wm="bbLean (Blackbox)"
|
||||||
wm="${wm:+$wm, }Explorer"
|
wm="${wm:+$wm, }Explorer"
|
||||||
;;
|
;;
|
||||||
@@ -763,7 +780,7 @@ get_wm_theme() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"Sawfish")
|
"Sawfish")
|
||||||
wm_theme="$(awk -F ")" '/\(quote default-frame-style/ {print $2}' \
|
wm_theme="$(awk -F '\\(quote|\\)' '/default-frame-style/ {print $(NF-4)}' \
|
||||||
"${HOME}/.sawfish/custom")"
|
"${HOME}/.sawfish/custom")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -931,7 +948,12 @@ get_cpu() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
speed_dir="/sys/devices/system/cpu/cpu0/cpufreq"
|
speed_dir="/sys/devices/system/cpu/cpu0/cpufreq"
|
||||||
temp_dir="/sys/class/hwmon/hwmon0/temp1_input"
|
|
||||||
|
# Select the right temperature file.
|
||||||
|
for temp_dir in /sys/class/hwmon/*; do
|
||||||
|
[[ "$(< "${temp_dir}/name")" =~ (coretemp|fam15h_power) ]] && \
|
||||||
|
{ temp_dir="${temp_dir}/temp1_input"; break; }
|
||||||
|
done
|
||||||
|
|
||||||
# Get CPU speed.
|
# Get CPU speed.
|
||||||
if [[ -d "$speed_dir" ]]; then
|
if [[ -d "$speed_dir" ]]; then
|
||||||
@@ -949,8 +971,8 @@ get_cpu() {
|
|||||||
|
|
||||||
# Get CPU temp.
|
# Get CPU temp.
|
||||||
if [[ -f "$temp_dir" ]]; then
|
if [[ -f "$temp_dir" ]]; then
|
||||||
temp="$(< "$temp_dir")"
|
deg="$(< "$temp_dir")"
|
||||||
temp="$((temp * 100 / 10000))"
|
deg="$((deg * 100 / 10000))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get CPU cores.
|
# Get CPU cores.
|
||||||
@@ -1013,12 +1035,12 @@ get_cpu() {
|
|||||||
# Get CPU temp.
|
# Get CPU temp.
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"FreeBSD"* | "DragonFly"* | "NetBSD"*)
|
"FreeBSD"* | "DragonFly"* | "NetBSD"*)
|
||||||
temp="$(sysctl -n dev.cpu.0.temperature)"
|
deg="$(sysctl -n dev.cpu.0.temperature)"
|
||||||
temp="${temp/C}"
|
deg="${deg/C}"
|
||||||
;;
|
;;
|
||||||
"OpenBSD"* | "Bitrig"*)
|
"OpenBSD"* | "Bitrig"*)
|
||||||
temp="$(sysctl -n hw.sensors.lm0.temp0)"
|
deg="$(sysctl -n hw.sensors.lm0.temp0)"
|
||||||
temp="${temp/ degC}"
|
deg="${deg/ degC}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@@ -1082,18 +1104,6 @@ get_cpu() {
|
|||||||
# Get CPU cores.
|
# Get CPU cores.
|
||||||
cores="$(sysconf NPROC_ONLN)"
|
cores="$(sysconf NPROC_ONLN)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"HP-UX")
|
|
||||||
# Get CPU name.
|
|
||||||
# This will be partial for now, because apparently hppa and
|
|
||||||
# IA64 has different approaches of how it should be handled.
|
|
||||||
|
|
||||||
# Get CPU speed.
|
|
||||||
# Same reasons as above.
|
|
||||||
|
|
||||||
# Get CPU cores.
|
|
||||||
cores="$(ioscan -k | grep -c "processor")"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Remove un-needed patterns from cpu output.
|
# Remove un-needed patterns from cpu output.
|
||||||
@@ -1147,15 +1157,15 @@ get_cpu() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Add CPU temp to the output.
|
# Add CPU temp to the output.
|
||||||
if [[ "$cpu_temp" != "off" && "$temp" ]]; then
|
if [[ "$cpu_temp" != "off" && "$deg" ]]; then
|
||||||
temp="${temp//.}"
|
deg="${deg//.}"
|
||||||
|
|
||||||
# Convert to Fahrenheit if enabled
|
# Convert to Fahrenheit if enabled
|
||||||
[[ "$cpu_temp" == "F" ]] && temp="$((temp * 90 / 50 + 320))"
|
[[ "$cpu_temp" == "F" ]] && deg="$((deg * 90 / 50 + 320))"
|
||||||
|
|
||||||
# Format the output
|
# Format the output
|
||||||
temp="[${temp/${temp: -1}}.${temp: -1}°${cpu_temp:-C}]"
|
deg="[${deg/${deg: -1}}.${deg: -1}°${cpu_temp:-C}]"
|
||||||
cpu="$cpu $temp"
|
cpu="$cpu $deg"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1202,7 +1212,7 @@ get_gpu() {
|
|||||||
# Read GPUs into array.
|
# Read GPUs into array.
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
gpus=($(lspci -mm | awk -F '\\"|\\" \\"|\\(' \
|
gpus=($(lspci -mm | awk -F '\\"|\\" \\"|\\(' \
|
||||||
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END{for(i in a)
|
'/"Display|"3D|"VGA/ {a[$0] = $1 $3 " " $4} END{for(i in a)
|
||||||
{if(!seen[a[i]]++) print a[i]}}'))
|
{if(!seen[a[i]]++) print a[i]}}'))
|
||||||
IFS="$old_ifs"
|
IFS="$old_ifs"
|
||||||
|
|
||||||
@@ -1234,9 +1244,16 @@ get_gpu() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*"intel"*)
|
*"intel"*)
|
||||||
gpu="$(glxinfo | grep "Device:.*Intel")"
|
# (sorry)
|
||||||
|
freq="$(< /sys/devices/pci0000:00/0000:\
|
||||||
|
"${gpu/ *}"/drm/card0/gt_cur_freq_mhz)"
|
||||||
|
|
||||||
|
type -p glxinfo >/dev/null && \
|
||||||
|
gpu="$(glxinfo | grep "Device:.*Intel")"
|
||||||
|
|
||||||
gpu="${gpu/*Intel/Intel}"
|
gpu="${gpu/*Intel/Intel}"
|
||||||
gpu="${gpu/'(R)'}"
|
gpu="${gpu/'(R)'}"
|
||||||
|
gpu="${gpu/'Corporation'}"
|
||||||
gpu="${gpu/ \(*}"
|
gpu="${gpu/ \(*}"
|
||||||
|
|
||||||
[[ -z "$(trim "$gpu")" ]] && gpu="Intel Integrated Graphics"
|
[[ -z "$(trim "$gpu")" ]] && gpu="Intel Integrated Graphics"
|
||||||
@@ -1253,7 +1270,8 @@ get_gpu() {
|
|||||||
gpu="${gpu/Intel }"
|
gpu="${gpu/Intel }"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
prin "${subtitle:+${subtitle}${gpu_name}}" "$gpu"
|
prin "${subtitle:+${subtitle}${gpu_name}}" "$gpu ${freq:+@ ${freq}Mhz}"
|
||||||
|
|
||||||
((++gpu_num))
|
((++gpu_num))
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -1429,13 +1447,6 @@ get_memory() {
|
|||||||
mem_free="$((mem_stat[5] / 1024))"
|
mem_free="$((mem_stat[5] / 1024))"
|
||||||
mem_used="$((mem_total - mem_free))"
|
mem_used="$((mem_total - mem_free))"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"HP-UX")
|
|
||||||
mem_total="$(machinfo | awk -F':' '/Memory/ {print $2}')"
|
|
||||||
mem_total="${mem_total/MB*}"
|
|
||||||
mem_free="$(($(vmstat | awk 'NR==3{printf $5}') / 1024))"
|
|
||||||
mem_used="$((mem_total - mem_free))"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"
|
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"
|
||||||
|
|
||||||
@@ -1650,7 +1661,7 @@ get_style() {
|
|||||||
# Fix weird output when the function is run multiple times.
|
# Fix weird output when the function is run multiple times.
|
||||||
unset gtk2_theme gtk3_theme theme path
|
unset gtk2_theme gtk3_theme theme path
|
||||||
|
|
||||||
if [[ -n "$DISPLAY" && "$os" != "Mac OS X" ]]; then
|
if [[ "$DISPLAY" && "$os" != "Mac OS X" ]]; then
|
||||||
# Get DE if user has disabled the function.
|
# Get DE if user has disabled the function.
|
||||||
((de_run != 1)) && get_de
|
((de_run != 1)) && get_de
|
||||||
|
|
||||||
@@ -2063,7 +2074,7 @@ get_disk() {
|
|||||||
# Get "df" version.
|
# Get "df" version.
|
||||||
df_version="$(df --version 2>&1)"
|
df_version="$(df --version 2>&1)"
|
||||||
case "$df_version" in
|
case "$df_version" in
|
||||||
*"blocks"*) # Haiku
|
*"Tracker"*) # Haiku
|
||||||
err "Your version of df cannot be used due to the non-standard flags"
|
err "Your version of df cannot be used due to the non-standard flags"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
@@ -2075,10 +2086,7 @@ get_disk() {
|
|||||||
# Create an array called 'disks' where each element is a separate line from
|
# 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.
|
# df's output. We then unset the first element which removes the column titles.
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
case "$os" in
|
disks=($(df "${df_flags[@]}" "${disk_show[@]:-/}"))
|
||||||
"HP-UX") disks=($(bdf "${disk_show[@]:-/}" 2>/dev/null)); df_version="bdf" ;;
|
|
||||||
*) disks=($(df "${df_flags[@]}" "${disk_show[@]:-/}" 2>/dev/null)) ;;
|
|
||||||
esac
|
|
||||||
unset 'disks[0]'
|
unset 'disks[0]'
|
||||||
IFS="$old_ifs"
|
IFS="$old_ifs"
|
||||||
|
|
||||||
@@ -2094,10 +2102,9 @@ get_disk() {
|
|||||||
disk_perc="${disk_info[4]/'%'}"
|
disk_perc="${disk_info[4]/'%'}"
|
||||||
|
|
||||||
case "$df_version" in
|
case "$df_version" in
|
||||||
*"befhikm"*|"bdf")
|
*"befhikm"*)
|
||||||
disk="$((disk_info[2]/1024/1024))G / $((disk_info[1]/1024/1024)) (${disk_perc}%)"
|
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}%)" ;;
|
*) disk="${disk_info[2]/i} / ${disk_info[1]/i} (${disk_perc}%)" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -2275,7 +2282,6 @@ get_install_date() {
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
"AIX") install_file="/var/adm/ras/bosinstlog" ;;
|
"AIX") install_file="/var/adm/ras/bosinstlog" ;;
|
||||||
"HP-UX") install_file="/dev/config" ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
ls_prog="$(ls --version 2>&1)"
|
ls_prog="$(ls --version 2>&1)"
|
||||||
@@ -2296,7 +2302,7 @@ get_install_date() {
|
|||||||
install_date="$(ls -tcd --full-time "$install_file" | awk '{printf $6 " " $7}')"
|
install_date="$(ls -tcd --full-time "$install_file" | awk '{printf $6 " " $7}')"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*"ACFHLNRS"* | *"RadC1xmnlog"* | *"1ARadeCx"*) # AIX ls / IRIX ls / HP-UX ls
|
*"ACFHLNRS"* | *"RadC1xmnlog"*) # AIX ls / IRIX ls
|
||||||
err "Install Date doesn't work because your 'ls' doesn't support full date/time."
|
err "Install Date doesn't work because your 'ls' doesn't support full date/time."
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
@@ -2326,10 +2332,16 @@ get_gpu_driver() {
|
|||||||
gpu_driver="$(lspci -nnk | awk -F ': ' \
|
gpu_driver="$(lspci -nnk | awk -F ': ' \
|
||||||
'/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')"
|
'/Display|3D|VGA/{nr[NR+2]}; NR in nr {printf $2 ", "}')"
|
||||||
gpu_driver="${gpu_driver%, }"
|
gpu_driver="${gpu_driver%, }"
|
||||||
|
|
||||||
|
if [[ "$gpu_driver" == *"nvidia"* ]]; then
|
||||||
|
gpu_driver="$(< /proc/driver/nvidia/version)"
|
||||||
|
gpu_driver="${gpu_driver/*Module }"
|
||||||
|
gpu_driver="NVIDIA ${gpu_driver/ *}"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
|
if [[ "$(kextstat | grep "GeForceWeb")" != "" ]]; then
|
||||||
gpu_driver="Nvidia Web Driver"
|
gpu_driver="NVIDIA Web Driver"
|
||||||
else
|
else
|
||||||
gpu_driver="macOS Default Graphics Driver"
|
gpu_driver="macOS Default Graphics Driver"
|
||||||
fi
|
fi
|
||||||
@@ -2392,7 +2404,8 @@ image_backend() {
|
|||||||
"ascii") get_ascii ;;
|
"ascii") get_ascii ;;
|
||||||
"off") image_backend="off" ;;
|
"off") image_backend="off" ;;
|
||||||
|
|
||||||
"caca" | "catimg" | "jp2a" | "iterm2" | "termpix" | "tycat" | "w3m" | "sixel")
|
"caca" | "catimg" | "jp2a" | "iterm2" | "termpix" |\
|
||||||
|
"tycat" | "w3m" | "sixel" | "pixterm")
|
||||||
get_image_source
|
get_image_source
|
||||||
|
|
||||||
if [[ ! -f "$image" ]]; then
|
if [[ ! -f "$image" ]]; then
|
||||||
@@ -2418,7 +2431,7 @@ image_backend() {
|
|||||||
*)
|
*)
|
||||||
err "Image: Unknown image backend specified '$image_backend'."
|
err "Image: Unknown image backend specified '$image_backend'."
|
||||||
err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2',
|
err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'jp2a', 'iterm2',
|
||||||
'off', 'sixel', 'termpix', 'tycat', 'w3m')"
|
'off', 'sixel', 'pixterm', 'termpix', 'tycat', 'w3m')"
|
||||||
err "Image: Falling back to ascii mode."
|
err "Image: Falling back to ascii mode."
|
||||||
get_ascii
|
get_ascii
|
||||||
;;
|
;;
|
||||||
@@ -2708,6 +2721,12 @@ get_image_size() {
|
|||||||
width="${size%% *}"
|
width="${size%% *}"
|
||||||
height="${size##* }"
|
height="${size##* }"
|
||||||
crop_mode="none"
|
crop_mode="none"
|
||||||
|
|
||||||
|
while (( "$width" >= ("$term_width" / 2) ||
|
||||||
|
"$height" >= "$term_height" )); do
|
||||||
|
width="$((width / 2))"
|
||||||
|
height="$((height / 2))"
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*) image_size="${image_size/px}" ;;
|
*) image_size="${image_size/px}" ;;
|
||||||
@@ -2722,7 +2741,7 @@ get_image_size() {
|
|||||||
make_thumbnail() {
|
make_thumbnail() {
|
||||||
# Name the thumbnail using variables so we can
|
# Name the thumbnail using variables so we can
|
||||||
# use it later.
|
# use it later.
|
||||||
image_name="$crop_mode-$crop_offset-$width-$height-${image//'/'/_}"
|
image_name="$crop_mode-$crop_offset-$width-$height-${image##*/}"
|
||||||
|
|
||||||
# Handle file extensions.
|
# Handle file extensions.
|
||||||
case "${image##*.}" in
|
case "${image##*.}" in
|
||||||
@@ -2812,8 +2831,16 @@ display_image() {
|
|||||||
to_off "Image: jp2a failed to display the image."
|
to_off "Image: jp2a failed to display the image."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"pixterm")
|
||||||
|
pixterm -tc "$((width / font_width))" \
|
||||||
|
-tr "$((height / font_height))" \
|
||||||
|
"$image" ||\
|
||||||
|
to_off "Image: pixterm failed to display the image."
|
||||||
|
;;
|
||||||
|
|
||||||
"sixel")
|
"sixel")
|
||||||
img2sixel -w "$width" "$image" || to_off "Image: libsixel failed to display the image."
|
img2sixel -w "$width" "$image" ||\
|
||||||
|
to_off "Image: libsixel failed to display the image."
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"termpix")
|
"termpix")
|
||||||
@@ -3035,7 +3062,7 @@ prin() {
|
|||||||
string="${subtitle_color}${bold}${string}"
|
string="${subtitle_color}${bold}${string}"
|
||||||
|
|
||||||
# Print the info.
|
# 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.
|
# Calculate info height.
|
||||||
((++info_height))
|
((++info_height))
|
||||||
@@ -3048,7 +3075,7 @@ get_underline() {
|
|||||||
if [[ "$underline_enabled" == "on" ]]; then
|
if [[ "$underline_enabled" == "on" ]]; then
|
||||||
printf -v underline "%${length}s"
|
printf -v underline "%${length}s"
|
||||||
printf "%b%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}" \
|
printf "%b%b\n" "${text_padding:+\033[${text_padding}C}${zws}${underline_color}" \
|
||||||
"${underline// /$underline_char}${reset}"
|
"${underline// /$underline_char}${reset} "
|
||||||
unset -v length
|
unset -v length
|
||||||
fi
|
fi
|
||||||
prin=1
|
prin=1
|
||||||
@@ -3433,6 +3460,11 @@ get_distro_colors() {
|
|||||||
ascii_file="kubuntu"
|
ascii_file="kubuntu"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"LEDE"*)
|
||||||
|
set_colors 4 7 1
|
||||||
|
ascii_file="lede"
|
||||||
|
;;
|
||||||
|
|
||||||
"Linux")
|
"Linux")
|
||||||
set_colors fg 8 3
|
set_colors fg 8 3
|
||||||
ascii_file="linux"
|
ascii_file="linux"
|
||||||
@@ -4105,7 +4137,7 @@ dynamic_prompt() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Set the prompt location.
|
# Set the prompt location.
|
||||||
((lines > 0)) && printf "%b" "\033[${lines}B"
|
((lines > 1)) && printf "%b" "\033[${lines}B"
|
||||||
}
|
}
|
||||||
|
|
||||||
old_functions() {
|
old_functions() {
|
||||||
@@ -4437,6 +4469,7 @@ IMAGE BACKEND:
|
|||||||
--catimg source Shortcut to use 'catimg' backend.
|
--catimg source Shortcut to use 'catimg' backend.
|
||||||
--iterm2 source Shortcut to use 'iterm2' backend.
|
--iterm2 source Shortcut to use 'iterm2' backend.
|
||||||
--jp2a source Shortcut to use 'jp2a' backend.
|
--jp2a source Shortcut to use 'jp2a' backend.
|
||||||
|
--pixterm source Shortcut to use 'pixterm' backend.
|
||||||
--sixel source Shortcut to use 'sixel' backend.
|
--sixel source Shortcut to use 'sixel' backend.
|
||||||
--termpix source Shortcut to use 'termpix' backend.
|
--termpix source Shortcut to use 'termpix' backend.
|
||||||
--tycat source Shortcut to use 'tycat' backend.
|
--tycat source Shortcut to use 'tycat' backend.
|
||||||
@@ -4652,8 +4685,8 @@ get_args() {
|
|||||||
# Image backend
|
# Image backend
|
||||||
"--backend") image_backend="$2" ;;
|
"--backend") image_backend="$2" ;;
|
||||||
"--source") image_source="$2" ;;
|
"--source") image_source="$2" ;;
|
||||||
"--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--sixel" |\
|
"--ascii" | "--caca" | "--catimg" | "--jp2a" | "--iterm2" | "--off" | "--pixterm" |\
|
||||||
"--termpix" | "--tycat" | "--w3m")
|
"--sixel" | "--termpix" | "--tycat" | "--w3m")
|
||||||
image_backend="${1/--}"
|
image_backend="${1/--}"
|
||||||
case "$2" in
|
case "$2" in
|
||||||
"-"* | "") ;;
|
"-"* | "") ;;
|
||||||
@@ -4771,6 +4804,11 @@ main() {
|
|||||||
# Take a screenshot.
|
# Take a screenshot.
|
||||||
[[ "$scrot" == "on" ]] && take_scrot
|
[[ "$scrot" == "on" ]] && take_scrot
|
||||||
|
|
||||||
|
# Add neofetch info to verbose output.
|
||||||
|
err "Neofetch command: $0 $*"
|
||||||
|
err "Neofetch version: $version"
|
||||||
|
err "Neofetch config: $config_version"
|
||||||
|
|
||||||
# Show error messages.
|
# Show error messages.
|
||||||
[[ "$verbose" == "on" ]] && printf "%b" "$err" >&2
|
[[ "$verbose" == "on" ]] && printf "%b" "$err" >&2
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.5.
|
||||||
.TH NEOFETCH "1" "September 2017" "Neofetch 3.3.0" "User Commands"
|
.TH NEOFETCH "1" "December 2017" "Neofetch 3.3.1-git" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Neofetch \- A fast, highly customizable system info script
|
Neofetch \- A fast, highly customizable system info script
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -207,6 +207,9 @@ Shortcut to use 'iterm2' backend.
|
|||||||
\fB\-\-jp2a\fR source
|
\fB\-\-jp2a\fR source
|
||||||
Shortcut to use 'jp2a' backend.
|
Shortcut to use 'jp2a' backend.
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-\-pixterm\fR source
|
||||||
|
Shortcut to use 'pixterm' backend.
|
||||||
|
.TP
|
||||||
\fB\-\-sixel\fR source
|
\fB\-\-sixel\fR source
|
||||||
Shortcut to use 'sixel' backend.
|
Shortcut to use 'sixel' backend.
|
||||||
.TP
|
.TP
|
||||||
|
Reference in New Issue
Block a user