Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
c55cfc0c
Commit
c55cfc0c
authored
Jun 11, 2021
by
Dylan Araps
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/dylanaraps/neofetch
parents
77f0efea
70ad34e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
12 deletions
+63
-12
neofetch
neofetch
+63
-12
No files found.
neofetch
View file @
c55cfc0c
...
@@ -158,7 +158,7 @@ uptime_shorthand="on"
...
@@ -158,7 +158,7 @@ uptime_shorthand="on"
# Memory
# Memory
# Show memory pecentage in output.
# Show memory pe
r
centage in output.
#
#
# Default: 'off'
# Default: 'off'
# Values: 'on', 'off'
# Values: 'on', 'off'
...
@@ -1644,7 +1644,7 @@ get_packages() {
...
@@ -1644,7 +1644,7 @@ get_packages() {
nix-store -qR /etc/profiles/per-user/"$USER"
nix-store -qR /etc/profiles/per-user/"$USER"
}
}
manager=nix-system && tot nix-store -qR /run/current-system/sw
manager=nix-system && tot nix-store -qR /run/current-system/sw
manager=nix-user && tot nix-
store -qR nix-
user-pkgs
manager=nix-user && tot nix-user-pkgs
}
}
;;
;;
...
@@ -2213,17 +2213,50 @@ get_cpu() {
...
@@ -2213,17 +2213,50 @@ get_cpu() {
speed="$((speed / 1000))"
speed="$((speed / 1000))"
else
else
speed="$(awk -F ': |\\.' '/cpu MHz|^clock/ {printf $2; exit}' "$cpu_file")"
case $kernel_machine in
speed="${speed/MHz}"
"sparc"*)
# SPARC systems use a different file to expose clock speed information.
speed_file="/sys/devices/system/cpu/cpu0/clock_tick"
speed="$(($(< "$speed_file") / 1000000))"
;;
*)
speed="$(awk -F ': |\\.' '/cpu MHz|^clock/ {printf $2; exit}' "$cpu_file")"
speed="${speed/MHz}"
;;
esac
fi
fi
# Get CPU temp.
# Get CPU temp.
[[ -f "$temp_dir" ]] && deg="$(($(< "$temp_dir") * 100 / 10000))"
[[ -f "$temp_dir" ]] && deg="$(($(< "$temp_dir") * 100 / 10000))"
# Get CPU cores.
# Get CPU cores.
case $cpu_cores in
case $kernel_machine in
"logical" | "on") cores="$(grep -c "^processor" "$cpu_file")" ;;
"sparc"*)
"physical") cores="$(awk '/^core id/&&!a[$0]++{++i} END {print i}' "$cpu_file")" ;;
case $cpu_cores in
# SPARC systems doesn't expose detailed topology information in
# /proc/cpuinfo so I have to use lscpu here.
"logical" | "on")
cores="$(lscpu | awk -F ': *' '/^CPU\(s\)/ {print $2}')"
;;
"physical")
cores="$(lscpu | awk -F ': *' '/^Core\(s\) per socket/ {print $2}')"
sockets="$(lscpu | awk -F ': *' '/^Socket\(s\)/ {print $2}')"
cores="$((sockets * cores))"
;;
esac
;;
*)
case $cpu_cores in
"logical" | "on")
cores="$(grep -c "^processor" "$cpu_file")"
;;
"physical")
cores="$(awk '/^core id/&&!a[$0]++{++i} END {print i}' "$cpu_file")"
;;
esac
;;
esac
esac
;;
;;
...
@@ -2286,7 +2319,17 @@ get_cpu() {
...
@@ -2286,7 +2319,17 @@ get_cpu() {
[[ -z "$speed" ]] && speed="$(sysctl -n hw.clockrate)"
[[ -z "$speed" ]] && speed="$(sysctl -n hw.clockrate)"
# Get CPU cores.
# Get CPU cores.
cores="$(sysctl -n hw.ncpu)"
case $kernel_name in
"OpenBSD"*)
[[ "$(sysctl -n hw.smt)" == "1" ]] && smt="on" || smt="off"
ncpufound="$(sysctl -n hw.ncpufound)"
ncpuonline="$(sysctl -n hw.ncpuonline)"
cores="${ncpuonline}/${ncpufound},\\xc2\\xa0SMT\\xc2\\xa0${smt}"
;;
*)
cores="$(sysctl -n hw.ncpu)"
;;
esac
# Get CPU temp.
# Get CPU temp.
case $kernel_name in
case $kernel_name in
...
@@ -2439,9 +2482,17 @@ get_gpu() {
...
@@ -2439,9 +2482,17 @@ get_gpu() {
case $os in
case $os in
"Linux")
"Linux")
# Read GPUs into array.
# Read GPUs into array.
gpu_cmd="$(lspci -mm | awk -F '\"|\" \"|\\(' \
gpu_cmd="$(lspci -mm |
'/"Display|"3D|"VGA/ {a[$0] = $1 " " $3 " " $4}
awk -F '\"|\" \"|\\(' \
END {for(i in a) {if(!seen[a[i]]++) print a[i]}}')"
'/"Display|"3D|"VGA/ {
a[$0] = $1 " " $3 " " ($7 ~ /^$|^Device [[:xdigit:]]+$/ ? $4 : $7)
}
END { for (i in a) {
if (!seen[a[i]]++) {
sub("^[^ ]+ ", "", a[i]);
print a[i]
}
}}')"
IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd"
IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd"
# Remove duplicate Intel Graphics outputs.
# Remove duplicate Intel Graphics outputs.
...
@@ -9314,7 +9365,7 @@ EOF
...
@@ -9314,7 +9365,7 @@ EOF
"PCLinuxOS"*)
"PCLinuxOS"*)
set_colors 4 7 1
set_colors 4 7 1
read -rd '' ascii_data <<'EOF'
read -rd '' ascii_data <<'EOF'
${c1}
mhhhyyyyhhhdN
${c1}
mhhhyyyyhhhdN
dyssyhhhhhhhhhhhssyhN
dyssyhhhhhhhhhhhssyhN
Nysyhhyo/:-.....-/oyhhhssd
Nysyhhyo/:-.....-/oyhhhssd
Nsshhy+. `/shhysm
Nsshhy+. `/shhysm
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment