mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 01:00:17 +00:00
Compare commits
99 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1c759e8119 | ||
|
3cef00ffa4 | ||
|
1b2b93737a | ||
|
7118516541 | ||
|
3c03a8379e | ||
|
2837d9bed1 | ||
|
0b54a97c04 | ||
|
38f0ac6a84 | ||
|
e383e6dfa4 | ||
|
ab3bb56d38 | ||
|
82ddddfda5 | ||
|
0286317737 | ||
|
532b191341 | ||
|
3259fc7b17 | ||
|
34800b6665 | ||
|
55c772a3cf | ||
|
3863fec23e | ||
|
3b82a89c24 | ||
|
69b642b759 | ||
|
3314f7e38d | ||
|
89fec98db8 | ||
|
2d1d689dd0 | ||
|
c0fb89ce40 | ||
|
04bdb70227 | ||
|
fd8f5145cb | ||
|
76399f55da | ||
|
2e65f48eaa | ||
|
20d53bfee8 | ||
|
f428478c41 | ||
|
fa26836b53 | ||
|
01a5c7da81 | ||
|
c7c84fcbba | ||
|
ab1e05adff | ||
|
b355096f4c | ||
|
4c22e1f19f | ||
|
6762381a82 | ||
|
56fa0a566e | ||
|
0ff2807c75 | ||
|
d63837c894 | ||
|
593ca37d26 | ||
|
bb6c4d374a | ||
|
e68fc1167b | ||
|
b5e69b2d40 | ||
|
0f945f9b63 | ||
|
329346d460 | ||
|
767cd93f38 | ||
|
4364e67d6c | ||
|
6cb37b91a7 | ||
|
b88e86e856 | ||
|
d1fa88b742 | ||
|
8e7fe64d82 | ||
|
7787ed2968 | ||
|
ece5ccf44b | ||
|
86b309aeef | ||
|
7f17306080 | ||
|
df6dab1721 | ||
|
60f5009cf8 | ||
|
1f510e2b32 | ||
|
82687cd6bf | ||
|
4b0cf233a8 | ||
|
253a1264f8 | ||
|
8f7b330bf7 | ||
|
4781f48e27 | ||
|
7e176284a7 | ||
|
62952a1f56 | ||
|
10527026fe | ||
|
9868784ff3 | ||
|
39cb924790 | ||
|
0c602800f5 | ||
|
62e0d5e6bb | ||
|
0b77804a65 | ||
|
2b59262928 | ||
|
2fcbc778f1 | ||
|
928bb6296d | ||
|
d0cb265517 | ||
|
2212cab688 | ||
|
256828995d | ||
|
685b6db822 | ||
|
d5b263747d | ||
|
c13be167f4 | ||
|
762820f136 | ||
|
ea1f853c2a | ||
|
ff3f0198d7 | ||
|
cb98562519 | ||
|
2de3a35933 | ||
|
bd67ad1a50 | ||
|
a9e1d91f3f | ||
|
8e073a13fa | ||
|
8e6cd99d3d | ||
|
41e61fd441 | ||
|
05171be3a1 | ||
|
a3af0a3f3e | ||
|
e96d0e4cf6 | ||
|
00e2006e48 | ||
|
2134176de2 | ||
|
a2919df1d7 | ||
|
d9d7b79d72 | ||
|
54bf42f1b6 | ||
|
6c957f3ba2 |
35
CHANGELOG.md
35
CHANGELOG.md
@@ -3,13 +3,29 @@
|
||||
- **[@MatthewCox](https://github.com/MatthewCox)**
|
||||
- **[@dawidd6](https://github.com/dawidd6)**
|
||||
- **[@erikdubois](https://github.com/erikdubois)**
|
||||
- **[@konimex](https://github.com/konimex)**
|
||||
- **[@mstraube](https://github.com/mstraube)**
|
||||
- **[@Artoriuz](https://github.com/Artoriuz)**
|
||||
- **[@WilsonRU](https://github.com/WilsonRU)**
|
||||
- **[@Takeya-Yuki](https://github.com/Takeya-Yuki)**
|
||||
- **[@iandrewt](https://github.com/iandrewt)**
|
||||
- **[@LER0ever](https://github.com/LER0ever)**
|
||||
|
||||
|
||||
## Operating System
|
||||
|
||||
- Added support for IRIX.
|
||||
- Added support for Arch XFerience. **[@mstraube](https://github.com/mstraube)**
|
||||
- Added support for CloverOS.
|
||||
- Added support for Maui. **[@mstraube](https://github.com/mstraube)**
|
||||
- Added support for KS Linux. **[@Takeya-Yuki](https://github.com/Takeya-Yuki)**
|
||||
|
||||
|
||||
## General
|
||||
|
||||
- Minimum required BASH version is now 3.2.
|
||||
- (Neofetch has always used 3.2+ features, I've just made it obvious now in the documentation.)
|
||||
- Fixed config file not being created on first install.
|
||||
|
||||
|
||||
## Images
|
||||
@@ -17,20 +33,30 @@
|
||||
- [w3m] Added `--loop` flag which makes Neofetch draw the image once per second.
|
||||
- This is a workaround to the images disappearing on resize and workspace switch.
|
||||
- Use Ctrl+C to exit.
|
||||
- [w3m] Fixed w3m-img not found on FreeBSD 12. **[@Artoriuz](https://github.com/Artoriuz)**
|
||||
|
||||
|
||||
## Ascii
|
||||
|
||||
- Added Ubuntu-MATE ascii art.
|
||||
- Fixed ArchLabs ascii art. **[@erikdubois](https://github.com/erikdubois)**
|
||||
- Updated GoboLinux ascii art. **[@WilsonRU](https://github.com/WilsonRU)**
|
||||
- Fixed `--ascii_distro windows10` not working.
|
||||
|
||||
|
||||
## Info
|
||||
|
||||
**Distro**
|
||||
|
||||
- [Solaris, AIX, Haiku] The machine architecture will now be shown properly instead of machine ID.
|
||||
|
||||
**Terminal Emulator**
|
||||
|
||||
- Added support for Neovim terminal emulator. **[@LER0ever](https://github.com/LER0ever)**
|
||||
- Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)**
|
||||
- [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)**
|
||||
- Use `$SSH_TTY` for terminal detection if machine is connected via SSH.
|
||||
- Break from loop if PPID can't be accessed/not found.
|
||||
|
||||
**GPU**
|
||||
|
||||
@@ -39,3 +65,12 @@
|
||||
**Song**
|
||||
|
||||
- Do not detect ibus\* or indicator\* as player. **[@dawidd6](https://github.com/dawidd6)**
|
||||
|
||||
**Model**
|
||||
|
||||
- Specify when running on a Hackintosh. **[@LER0ever](https://github.com/LER0ever)**
|
||||
|
||||
|
||||
**Memory**
|
||||
|
||||
- [FreeBSD]: Fix inaccurate free memory calculation.
|
||||
|
@@ -10,7 +10,7 @@ Neofetch is a CLI system information tool written in BASH. Neofetch displays inf
|
||||
|
||||
Neofetch is highly customizable through the use of command line flags or the user config file. There are over 50 config options to mess around with and there's the `print_info()` function and friends which let you add your own custom info.
|
||||
|
||||
Neofetch can be used on any OS that has BASH 3.2+, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`.
|
||||
Neofetch can be used on any OS that has BASH 3.2+, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, `IRIX`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`.
|
||||
|
||||
For more information:
|
||||
|
||||
|
19
ascii/distro/arch_xferience
Normal file
19
ascii/distro/arch_xferience
Normal file
@@ -0,0 +1,19 @@
|
||||
${c1} ``--:::::::-.`
|
||||
.-/+++ooooooooo+++:-`
|
||||
`-/+oooooooooooooooooo++:.
|
||||
-/+oooooo/+ooooooooo+/ooo++:`
|
||||
`/+oo++oo. .+oooooo+.-: +:-o+-
|
||||
`/+o/. -o. :oooooo+ ```:.+oo+-
|
||||
`:+oo- -/` :oooooo+ .`-`+oooo/.
|
||||
.+ooo+. .` `://///+-+..oooooo+:`
|
||||
-+ooo:` ``.-+oooooo+/`
|
||||
-+oo/` :+oooo/.
|
||||
.+oo: ..-/. . -+oo+/`
|
||||
`/++- -:::++::/. -+oo+-
|
||||
./o: `:///+- `./ooo+:`
|
||||
.++- `` /-` -:/+oooo+:`
|
||||
.:+/:`` `-:ooooooo++-
|
||||
./+o+//:...../+oooooooo++:`
|
||||
`:/++ooooooooooooo++/-`
|
||||
`.-//++++++//:-.`
|
||||
``````
|
20
ascii/distro/cloveros
Normal file
20
ascii/distro/cloveros
Normal file
@@ -0,0 +1,20 @@
|
||||
${c1} `omo``omo`
|
||||
`oNMMMNNMMMNo`
|
||||
`oNMMMMMMMMMMMMNo`
|
||||
oNMMMMMMMMMMMMMMMMNo
|
||||
`sNMMMMMMMMMMMMMMNs`
|
||||
`omo` `sNMMMMMMMMMMNs` `omo`
|
||||
`oNMMMNo` `sNMMMMMMNs` `oNMMMNo`
|
||||
`oNMMMMMMMNo` `oNMMNs` `oNMMMMMMMNo`
|
||||
oNMMMMMMMMMMMNo` `sy` `oNMMMMMMMMMMMNo
|
||||
`sNMMMMMMMMMMMMNo.${c2}oNNs${c1}.oNMMMMMMMMMMMMNs`
|
||||
`oNMMMMMMMMMMMMNs.${c2}oNNs${c1}.oNMMMMMMMMMMMMNo`
|
||||
oNMMMMMMMMMMMNs` `sy` `oNMMMMMMMMMMMNo
|
||||
`oNMMMMMMMNs` `oNMMNo` `oNMMMMMMMNs`
|
||||
`oNMMMNs` `sNMMMMMMNs` `oNMMMNs`
|
||||
`oNs` `sNMMMMMMMMMMNs` `oNs`
|
||||
`sNMMMMMMMMMMMMMMNs`
|
||||
+NMMMMMMMMMMMMMMMMNo
|
||||
`oNMMMMMMMMMMMMNo`
|
||||
`oNMMMNNMMMNs`
|
||||
`omo``oNs`
|
@@ -1,13 +1,6 @@
|
||||
${c1}+Nhsssss. `MM:
|
||||
${c2}MM/ ./:::/- `MMo::// ./:::/-
|
||||
MM/-osdd-+mm---hNs`MM+--/Md.omd---dmo
|
||||
${c3}MM/ `MM:sMm yMh`MM: .MM-yMh hMy
|
||||
mM+..-MM:oNm...hNy`MM/..:Mm.sNd...dNs
|
||||
${c4}`+++++oo.`-o++++:``oo++++o` `:o+++o:`
|
||||
|
||||
${c1}oo- :o+
|
||||
${c2}MM/ /yo
|
||||
MM/ +mh mmyoosm/`+mh omy`od+..+mo
|
||||
${c3}MM/ sMm MM/ `MM:sMm yMh -dmmm:
|
||||
MM/ sMm MM/ `MM:sMm yMh .hNNm.
|
||||
${c4}MMhsssss.sMm MM/ `MM:-yNsssmMh`sNs-.sMs
|
||||
${c1}_____ _
|
||||
/ ____| | |
|
||||
| | __ ___ | |__ ___
|
||||
| | |_ |/ _ \| '_ \ / _ \
|
||||
| |__| | (_) | |_) | (_) |
|
||||
\_____|\___/|_.__/ \___/
|
||||
|
19
ascii/distro/irix
Normal file
19
ascii/distro/irix
Normal file
@@ -0,0 +1,19 @@
|
||||
${c1} ./ohmNd/ +dNmho/-
|
||||
`:+ydNMMMMMMMM.-MMMMMMMMMdyo:.
|
||||
`hMMMMMMNhs/sMMM-:MMM+/shNMMMMMMh`
|
||||
-NMMMMMmo-` /MMM-/MMM- `-omMMMMMN.
|
||||
`.`-+hNMMMMMNhyMMM-/MMMshmMMMMMmy+...`
|
||||
+mMNds:-:sdNMMMMMMMyyMMMMMMMNdo:.:sdMMm+
|
||||
dMMMMMMmy+.-/ymNMMMMMMMMNmy/-.+hmMMMMMMd
|
||||
oMMMMmMMMMNds:.+MMMmmMMN/.-odNMMMMmMMMM+
|
||||
.MMMM-/ymMMMMMmNMMy..hMMNmMMMMMmy/-MMMM.
|
||||
hMMM/ `/dMMMMMMMN////NMMMMMMMd/. /MMMh
|
||||
/MMMdhmMMMmyyMMMMMMMMMMMMhymMMMmhdMMM:
|
||||
`mMMMMNho//sdMMMMM//NMMMMms//ohNMMMMd
|
||||
`/so/:+ymMMMNMMMM` mMMMMMMMmh+::+o/`
|
||||
`yNMMNho-yMMMM` NMMMm.+hNMMNh`
|
||||
-MMMMd: oMMMM. NMMMh :hMMMM-
|
||||
-yNMMMmooMMMM- NMMMyomMMMNy-
|
||||
.omMMMMMMMM-`NMMMMMMMmo.
|
||||
`:hMMMMMM. NMMMMMh/`
|
||||
.odNm+ /dNms.
|
11
ascii/distro/kslinux
Normal file
11
ascii/distro/kslinux
Normal file
@@ -0,0 +1,11 @@
|
||||
${c1} K K U U RRRR ooo
|
||||
K K U U R R o o
|
||||
KKK U U RRRR o o
|
||||
K K U U R R o o
|
||||
K K UUU R R ooo
|
||||
|
||||
${c2} SSS AAA W W AAA
|
||||
S A A W W A A
|
||||
SSS AAAAA W W W AAAAA
|
||||
S A A WW WW A A
|
||||
SSS A A W W A A
|
20
ascii/distro/maui
Normal file
20
ascii/distro/maui
Normal file
@@ -0,0 +1,20 @@
|
||||
${c1} `.-://////:--`
|
||||
.:/oooooooooooooooo+:.
|
||||
`:+ooooooooooooooooooooooo:`
|
||||
`:oooooooooooooooooooooooooooo/`
|
||||
..```-oooooo/-`` `:oooooo+:.` `--
|
||||
:. +oo+-` /ooo/` -/
|
||||
-o. `o+- +o/` -o:
|
||||
`oo` ::` :o/ `+. .+o` /oo.
|
||||
/o+ . -+oo- ` /oo/ `ooo/
|
||||
+o- /ooo+` .+ooo. :ooo+
|
||||
++ .+oooo: -oooo+ `oooo+
|
||||
:. .oooooo` :ooooo- :oooo:
|
||||
` .oooooo: :ooooo+ `ooo+-`
|
||||
.+oooooo` -oooooo: `o/-
|
||||
+oooooo: .ooooooo.
|
||||
/ooooooo` /ooooooo/ ..
|
||||
`:oooooooo/:::/ooooooooo+:--:/:`
|
||||
`:+oooooooooooooooooooooo+:`
|
||||
.:+oooooooooooooooo+:.
|
||||
`.-://////:-.`
|
@@ -724,4 +724,4 @@ image_host="teknik"
|
||||
#
|
||||
# NOTE: Don't change this value, neofetch reads this to determine
|
||||
# how to handle backwards compatibility.
|
||||
config_version="3.1.0-git"
|
||||
config_version="3.2.0"
|
||||
|
166
neofetch
166
neofetch
@@ -9,7 +9,7 @@
|
||||
# https://github.com/dylanaraps/
|
||||
|
||||
# Neofetch version.
|
||||
version="3.1.0-git"
|
||||
version="3.2.0"
|
||||
|
||||
bash_version="${BASH_VERSION/.*}"
|
||||
sys_locale="${LANG:-C}"
|
||||
@@ -20,8 +20,8 @@ old_ifs="$IFS"
|
||||
export LC_ALL=C
|
||||
export LANG=C
|
||||
|
||||
# Add /usr/xpg4/bin, /usr/sbin, and /sbin to PATH.
|
||||
export PATH="/usr/xpg4/bin:/usr/sbin:/sbin:${PATH}"
|
||||
# Add /usr/xpg4/bin, /usr/sbin, /sbin, and /usr/etc to PATH.
|
||||
export PATH="/usr/xpg4/bin:/usr/sbin:/sbin:/usr/etc:${PATH}"
|
||||
|
||||
# Set no case match.
|
||||
shopt -s nocasematch
|
||||
@@ -43,6 +43,7 @@ get_os() {
|
||||
"Haiku") os="Haiku" ;;
|
||||
"MINIX") os="MINIX" ;;
|
||||
"AIX") os="AIX" ;;
|
||||
"IRIX64") os="IRIX" ;;
|
||||
*)
|
||||
printf "%s\n" "Unknown OS detected: '$kernel_name', aborting..." >&2
|
||||
printf "%s\n" "Open an issue on GitHub to add support for your OS." >&2
|
||||
@@ -91,7 +92,10 @@ get_distro() {
|
||||
distro="$(lsb_release $lsb_flags)"
|
||||
|
||||
elif type -p guix >/dev/null; then
|
||||
distro="GuixSD"
|
||||
case "$distro_shorthand" in
|
||||
"on" | "tiny") distro="GuixSD" ;;
|
||||
*) distro="GuixSD $(guix system -V | awk 'NR==1{printf $5}')"
|
||||
esac
|
||||
|
||||
elif type -p crux >/dev/null; then
|
||||
distro="$(crux)"
|
||||
@@ -103,6 +107,9 @@ get_distro() {
|
||||
elif type -p tazpkg >/dev/null; then
|
||||
distro="SliTaz $(< /etc/slitaz-release)"
|
||||
|
||||
elif type -p kpm > /dev/null; then
|
||||
distro="KSLinux"
|
||||
|
||||
elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then
|
||||
distro="Android $(getprop ro.build.version.release)"
|
||||
|
||||
@@ -205,13 +212,23 @@ get_distro() {
|
||||
"AIX")
|
||||
distro="AIX $(oslevel)"
|
||||
;;
|
||||
|
||||
"IRIX")
|
||||
distro="IRIX ${kernel_version}"
|
||||
;;
|
||||
esac
|
||||
|
||||
[[ -z "$distro" ]] && distro="$os (Unknown)"
|
||||
|
||||
# Get OS architecture.
|
||||
[[ "$os_arch" == "on" ]] && \
|
||||
if [[ "$os_arch" == "on" ]]; then
|
||||
case "$os" in
|
||||
"Solaris" | "AIX" | "BSD" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;;
|
||||
*) machine_arch="$(uname -m)" ;;
|
||||
|
||||
esac
|
||||
distro+=" ${machine_arch}"
|
||||
fi
|
||||
|
||||
[[ "${ascii_distro:-auto}" == "auto" ]] && \
|
||||
ascii_distro="$(trim "$distro")"
|
||||
@@ -236,7 +253,14 @@ get_model() {
|
||||
fi
|
||||
;;
|
||||
|
||||
"Mac OS X") model="$(sysctl -n hw.model)" ;;
|
||||
"Mac OS X")
|
||||
if [[ "$(kextstat | grep "FakeSMC")" != "" ]]; then
|
||||
model="Hackintosh (SMBIOS: $(sysctl -n hw.model))"
|
||||
else
|
||||
model="$(sysctl -n hw.model)"
|
||||
fi
|
||||
;;
|
||||
|
||||
"iPhone OS")
|
||||
case "$machine_arch" in
|
||||
"iPad1,1") model="iPad" ;;
|
||||
@@ -257,7 +281,7 @@ get_model() {
|
||||
"iPhone2,1") model="iPhone 3GS" ;;
|
||||
"iPhone3,"[1-3]) model="iPhone 4" ;;
|
||||
"iPhone4,1") model="iPhone 4S" ;;
|
||||
"iPhone5,"[1-2]) model="iPhone 4" ;;
|
||||
"iPhone5,"[1-2]) model="iPhone 5" ;;
|
||||
"iPhone5,"[3-4]) model="iPhone 5c" ;;
|
||||
"iPhone6,"[1-2]) model="iPhone 5s" ;;
|
||||
"iPhone7,2") model="iPhone 6" ;;
|
||||
@@ -317,8 +341,8 @@ get_title() {
|
||||
}
|
||||
|
||||
get_kernel() {
|
||||
# Since AIX is an integrated system, it's better to skip this function altogether
|
||||
[[ "$os" == "AIX" ]] && return
|
||||
# Since these OS are integrated systems, it's better to skip this function altogether
|
||||
[[ "$os" =~ (AIX|IRIX) ]] && return
|
||||
|
||||
case "$kernel_shorthand" in
|
||||
"on") kernel="$kernel_version" ;;
|
||||
@@ -366,7 +390,7 @@ get_uptime() {
|
||||
seconds="${seconds/.*}"
|
||||
;;
|
||||
|
||||
"AIX")
|
||||
"AIX" | "IRIX")
|
||||
t="$(LC_ALL=POSIX ps -o etime= -p 1)"
|
||||
d="0" h="0"
|
||||
case "$t" in *"-"*) d="${t%%-*}"; t="${t#*-}";; esac
|
||||
@@ -435,6 +459,9 @@ get_packages() {
|
||||
type -p dpkg >/dev/null && \
|
||||
packages="$((packages+=$(dpkg --get-selections | grep -cv deinstall$)))"
|
||||
|
||||
type -p kpm >/dev/null && \
|
||||
packages="$((packages+=$(kpm --get-selections | grep -cv deinstall$)))"
|
||||
|
||||
type -p pkgtool >/dev/null && \
|
||||
packages="$((packages+=$(ls -1 /var/log/packages | wc -l)))"
|
||||
|
||||
@@ -532,6 +559,10 @@ get_packages() {
|
||||
packages="$(lslpp -J -l -q | grep -cv '^#')"
|
||||
packages="$((packages+=$(rpm -qa | wc -l)))"
|
||||
;;
|
||||
|
||||
"IRIX")
|
||||
packages="$(($(versions -b | wc -l)-3))"
|
||||
;;
|
||||
esac
|
||||
|
||||
((packages == 0)) && unset packages
|
||||
@@ -933,6 +964,7 @@ get_cpu() {
|
||||
cpu="${cpu//*$'\n'}"
|
||||
cpu="${cpu/[0-9]\.*}"
|
||||
cpu="${cpu/ @*}"
|
||||
cpu="${cpu/\(portid*}"
|
||||
|
||||
# Get CPU speed.
|
||||
speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')"
|
||||
@@ -971,6 +1003,17 @@ get_cpu() {
|
||||
"physical") cores="$(lparstat -i | awk -F':' '/Active Physical CPUs/ {printf $2}')"
|
||||
esac
|
||||
;;
|
||||
|
||||
"IRIX")
|
||||
# Get CPU name.
|
||||
cpu="$(hinv -c processor | awk -F':' '/CPU:/ {printf $2}')"
|
||||
|
||||
# Get CPU speed.
|
||||
speed="$(hinv -c processor | awk '/MHZ/ {printf $2}')"
|
||||
|
||||
# Get CPU cores.
|
||||
cores="$(sysconf NPROC_ONLN)"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$speed" ]]; then
|
||||
@@ -1003,6 +1046,7 @@ get_cpu() {
|
||||
cpu="${cpu//with Radeon * Graphics}"
|
||||
cpu="${cpu//, altivec supported}"
|
||||
cpu="${cpu//FPU*}"
|
||||
cpu="${cpu//Chip Revision*}"
|
||||
|
||||
# Trim spaces from core output
|
||||
cores="${cores//[[:space:]]}"
|
||||
@@ -1049,6 +1093,7 @@ get_cpu_usage() {
|
||||
"Haiku") cores="$(sysinfo -cpu | grep -c -F 'CPU #')" ;;
|
||||
"iPhone OS") cores="${cpu/*\(}"; cores="${cores/\)*}" ;;
|
||||
"AIX") cores="$(lparstat -i | awk -F':' '/Online Virtual CPUs/ {printf $2}')" ;;
|
||||
"IRIX") cores="$(sysconf NPROC_ONLN)"
|
||||
esac
|
||||
fi
|
||||
|
||||
@@ -1241,8 +1286,11 @@ get_memory() {
|
||||
case "$kernel_name" in
|
||||
"NetBSD"*) mem_free="$(($(awk -F ':|kB' '/MemFree:/ {printf $2}' /proc/meminfo) / 1024))" ;;
|
||||
"FreeBSD"* | "DragonFly"*)
|
||||
mem_free="$(top -d 1 | awk -F ',' '/^Mem:/ {print $5}')"
|
||||
mem_free="${mem_free/M Free}"
|
||||
hw_pagesize="$(sysctl -n hw.pagesize)"
|
||||
mem_inactive="$(($(sysctl -n vm.stats.vm.v_inactive_count) * hw_pagesize))"
|
||||
mem_unused="$(($(sysctl -n vm.stats.vm.v_free_count) * hw_pagesize))"
|
||||
mem_cache="$(($(sysctl -n vm.stats.vm.v_cache_count) * hw_pagesize))"
|
||||
mem_free="$(((mem_inactive + mem_unused + mem_cache) / 1024 / 1024))"
|
||||
;;
|
||||
"MINIX")
|
||||
mem_free="$(top -d 1 | awk -F ',' '/^Memory:/ {print $2}')"
|
||||
@@ -1278,6 +1326,13 @@ get_memory() {
|
||||
mem_used="$((mem_total - mem_free))"
|
||||
mem_label="MB"
|
||||
;;
|
||||
|
||||
"IRIX")
|
||||
mem_stat=($(pmem | head -1))
|
||||
mem_total="$((mem_stat[3] / 1024))"
|
||||
mem_free="$((mem_stat[5] / 1024))"
|
||||
mem_used="$((mem_total - mem_free))"
|
||||
;;
|
||||
esac
|
||||
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"
|
||||
|
||||
@@ -1632,16 +1687,22 @@ get_term() {
|
||||
|
||||
# Check $PPID for terminal emulator.
|
||||
while [[ -z "$term" ]]; do
|
||||
parent="$(get_ppid "$parent")"
|
||||
name="$(get_process_name "$parent")"
|
||||
|
||||
case "${name// }" in
|
||||
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
|
||||
"login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;;
|
||||
"ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;;
|
||||
"gnome-terminal-") term="gnome-terminal" ;;
|
||||
*) term="${name##*/}" ;;
|
||||
esac
|
||||
if [[ "$SSH_CONNECTION" ]]; then
|
||||
term="$SSH_TTY"
|
||||
else
|
||||
parent="$(get_ppid "$parent")"
|
||||
[[ -z "$parent" ]] && break
|
||||
name="$(get_process_name "$parent")"
|
||||
case "${name// }" in
|
||||
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
|
||||
"login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;;
|
||||
"ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;;
|
||||
"gnome-terminal-") term="gnome-terminal" ;;
|
||||
*"nvim") term="Neovim Terminal" ;;
|
||||
*"NeoVimServer"*) term="VimR Terminal" ;;
|
||||
*) term="${name##*/}" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
# Log that the function was run.
|
||||
@@ -1814,12 +1875,13 @@ get_disk() {
|
||||
type -p df >/dev/null 2>&1 || \
|
||||
{ err "Disk requires 'df' to function. Install 'df' to get disk info."; return; }
|
||||
|
||||
# Get "df" flags.
|
||||
case "$os" in
|
||||
"Haiku") err "Disk doesn't work on Haiku due to the non-standard 'df'"; return ;;
|
||||
"Mac OS X") df_flags=(-P -h) ;;
|
||||
"AIX") df_flags=(-P -g) ;;
|
||||
*) df_flags=(-h) ;;
|
||||
# Get "df" version.
|
||||
df_version="$(df --version 2>&1)"
|
||||
case "$df_version" in
|
||||
*"blocks"*) err "Your version of df cannot be used due to the non-standard flags" ; return ;; # Haiku
|
||||
*"IMitv"*) df_flags=(-P -g) ;; # AIX
|
||||
*"befhikm"*) df_flags=(-P -k) ;; # IRIX
|
||||
*) df_flags=(-P -h) ;;
|
||||
esac
|
||||
|
||||
# Create an array called 'disks' where each element is a separate line from
|
||||
@@ -1838,7 +1900,10 @@ get_disk() {
|
||||
disk_info=($disk)
|
||||
disk_perc="${disk_info[4]/'%'}"
|
||||
|
||||
disk="${disk_info[2]/i} / ${disk_info[1]/i} (${disk_perc}%)"
|
||||
case "$df_version" in
|
||||
*"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
|
||||
|
||||
# Subtitle.
|
||||
case "$disk_subtitle" in
|
||||
@@ -1947,7 +2012,7 @@ get_battery() {
|
||||
|
||||
get_local_ip() {
|
||||
case "$os" in
|
||||
"Linux" | "BSD" | "Solaris" | "AIX")
|
||||
"Linux" | "BSD" | "Solaris" | "AIX" | "IRIX")
|
||||
local_ip="$(ip route get 1 | awk -F'src' '{print $2; exit}')"
|
||||
local_ip="${local_ip/uid*}"
|
||||
[[ -z "$local_ip" ]] && local_ip="$(ifconfig -a | awk '/broadcast/ {print $2; exit}')"
|
||||
@@ -2006,7 +2071,7 @@ get_install_date() {
|
||||
esac
|
||||
;;
|
||||
"Haiku") install_file="/boot" ;;
|
||||
"BSD" | "MINIX")
|
||||
"BSD" | "MINIX" | "IRIX")
|
||||
case "$kernel_name" in
|
||||
"FreeBSD") install_file="/etc/hostid" ;;
|
||||
"NetBSD" | "DragonFly"*) install_file="/etc/defaults/rc.conf" ;;
|
||||
@@ -2022,7 +2087,7 @@ get_install_date() {
|
||||
*"crtime"*) install_date="$(ls -tdcE "$install_file" | awk '{printf $6 " " $7}')" ;; # xpg4 (Solaris)
|
||||
*"ACFHLRSZ"*) install_date="$(ls -dl "$install_file" | awk '{printf $6 " " $7}')" ;; # Toybox
|
||||
*"GNU coreutils"*) install_date="$(ls -tcd --full-time "$install_file" | awk '{printf $6 " " $7}')" ;;
|
||||
*"ACFHLNRS"*) err "Install Date doesn't work because your 'ls' does not support showing full date and time."; return ;; # AIX ls
|
||||
*"ACFHLNRS"* | *"RadC1xmnlog"*) err "Install Date doesn't work because your 'ls' does not support showing full date and time."; return ;; # AIX ls / IRIX ls
|
||||
*) install_date="$(ls -dlctT "$install_file" | awk '{printf $9 " " $6 " "$7 " " $8}')" ;;
|
||||
esac
|
||||
|
||||
@@ -2293,6 +2358,9 @@ get_w3m_img_path() {
|
||||
elif [[ -x "/usr/libexec64/w3m/w3mimgdisplay" ]]; then
|
||||
w3m_img_path="/usr/libexec64/w3m/w3mimgdisplay"
|
||||
|
||||
elif [[ -x "/usr/local/libexec/w3m/w3mimgdisplay" ]]; then
|
||||
w3m_img_path="/usr/local/libexec/w3m/w3mimgdisplay"
|
||||
|
||||
else
|
||||
err "Image: w3m-img wasn't found on your system"
|
||||
fi
|
||||
@@ -2629,7 +2697,7 @@ scrot_program() {
|
||||
elif type -p maim >/dev/null; then
|
||||
scrot_program=(maim)
|
||||
|
||||
elif type -p import >/dev/null; then
|
||||
elif type -p import >/dev/null && [[ "$os" != "Mac OS X" ]]; then
|
||||
scrot_program=(import -window root)
|
||||
|
||||
elif type -p imlib2_grab >/dev/null; then
|
||||
@@ -2864,6 +2932,11 @@ get_distro_colors() {
|
||||
ascii_file="archlabs"
|
||||
;;
|
||||
|
||||
*"XFerience"*)
|
||||
set_colors 6 6 7 1
|
||||
ascii_file="arch_xferience"
|
||||
;;
|
||||
|
||||
"Arch"*)
|
||||
set_colors 6 6 7 1
|
||||
ascii_file="arch"
|
||||
@@ -2919,6 +2992,11 @@ get_distro_colors() {
|
||||
ascii_file="chrome"
|
||||
;;
|
||||
|
||||
"Clover"*)
|
||||
set_colors 2 6
|
||||
ascii_file="cloveros"
|
||||
;;
|
||||
|
||||
"crux_small")
|
||||
set_colors 4 5 7 6
|
||||
ascii_file="crux_small"
|
||||
@@ -3059,6 +3137,11 @@ get_distro_colors() {
|
||||
ascii_file="korora"
|
||||
;;
|
||||
|
||||
"KSLinux"*)
|
||||
set_colors 4 7 1
|
||||
ascii_file="kslinux"
|
||||
;;
|
||||
|
||||
"Kubuntu"*)
|
||||
set_colors 4 7 1
|
||||
ascii_file="kubuntu"
|
||||
@@ -3094,6 +3177,11 @@ get_distro_colors() {
|
||||
ascii_file="manjaro"
|
||||
;;
|
||||
|
||||
"Maui"*)
|
||||
set_colors 6 7
|
||||
ascii_file="maui"
|
||||
;;
|
||||
|
||||
"Mer"*)
|
||||
set_colors 4 7 1
|
||||
ascii_file="mer"
|
||||
@@ -3359,7 +3447,7 @@ get_distro_colors() {
|
||||
ascii_file="void"
|
||||
;;
|
||||
|
||||
*"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"*)
|
||||
*"[Windows 10]"* | *"on Windows 10"* | "Windows 8"* | "Windows 10"* | "windows10" | "windows8" )
|
||||
set_colors 6 7
|
||||
ascii_file="windows10"
|
||||
;;
|
||||
@@ -3405,6 +3493,11 @@ get_distro_colors() {
|
||||
set_colors 3 7
|
||||
ascii_file="solaris"
|
||||
;;
|
||||
|
||||
"IRIX"*)
|
||||
set_colors 4 7
|
||||
ascii_file="irix"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@@ -3550,7 +3643,7 @@ get_user_config() {
|
||||
config_file="${XDG_CONFIG_HOME}/neofetch/config"
|
||||
|
||||
elif [[ -f "/etc/neofetch/config" ]]; then
|
||||
cp "/usr/share/neofetch/config" "${XDG_CONFIG_HOME}/neofetch"
|
||||
cp "/etc/neofetch/config" "${XDG_CONFIG_HOME}/neofetch"
|
||||
config_file="${XDG_CONFIG_HOME}/neofetch/config"
|
||||
|
||||
elif [[ -f "/usr/local/etc/neofetch/config" ]]; then
|
||||
@@ -3730,11 +3823,10 @@ old_options() {
|
||||
cache_uname() {
|
||||
# Cache the output of uname so we don't
|
||||
# have to spawn it multiple times.
|
||||
uname=($(uname -srm))
|
||||
uname=($(uname -sr))
|
||||
|
||||
kernel_name="${uname[0]}"
|
||||
kernel_version="${uname[1]}"
|
||||
machine_arch="${uname[2]}"
|
||||
}
|
||||
|
||||
convert_time() {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
|
||||
.TH NEOFETCH "1" "April 2017" "Neofetch 3.1.0-git" "User Commands"
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
|
||||
.TH NEOFETCH "1" "June 2017" "Neofetch 3.2.0" "User Commands"
|
||||
.SH NAME
|
||||
Neofetch \- A fast, highly customizable system info script
|
||||
.SH SYNOPSIS
|
||||
|
Reference in New Issue
Block a user