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
440153e7
Commit
440153e7
authored
Dec 14, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPU: Don't simplify option names for no reason
parent
f3bfd5a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
config
config/config
+4
-3
neofetch
neofetch
+2
-9
No files found.
config/config
View file @
440153e7
...
@@ -134,11 +134,12 @@ shell_version="on"
...
@@ -134,11 +134,12 @@ shell_version="on"
# CPU speed type
# CPU speed type
#
#
# Default: 'bios'
# Default: 'bios
_limit
'
# Values:
'current', 'min', 'max', 'bios',
# Values:
'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
# Flag: --speed_type
# Flag: --speed_type
# Supports: Linux with 'cpufreq'
# Supports: Linux with 'cpufreq'
speed_type
=
"bios"
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
speed_type
=
"bios_limit"
# Shorten the output of the CPU function
# Shorten the output of the CPU function
#
#
...
...
neofetch
View file @
440153e7
...
@@ -734,23 +734,16 @@ get_cpu() {
...
@@ -734,23 +734,16 @@ get_cpu() {
"Android"
*) cpu=
"
$(
getprop ro.product.board
)
"
;;
"Android"
*) cpu=
"
$(
getprop ro.product.board
)
"
;;
*) cpu=
"
$(
awk
-F
': | @'
'/model name|Processor/ {printf $2; exit}'
/proc/cpuinfo
)
"
;;
*) cpu=
"
$(
awk
-F
': | @'
'/model name|Processor/ {printf $2; exit}'
/proc/cpuinfo
)
"
;;
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"
temp_dir=
"/sys/class/hwmon/hwmon0/temp1_input"
# Get cpu speed
# Get cpu speed
if [[ -d
"
$speed_dir
"
]]; then
if [[ -d
"
$speed_dir
"
]]; then
case
"
$speed_type
"
in
# Fallback to bios_limit if
$speed_type
fails.
"current"
) speed_type=
"scaling_cur_freq"
;;
"min"
) speed_type=
"scaling_min_freq"
;;
"max"
) speed_type=
"scaling_max_freq"
;;
"bios"
) speed_type=
"bios_limit"
;;
esac
# Fallback to cpuinfo_max_freq if
$speed_type
fails
speed=
"
$(
<
"
${
speed_dir
}
/
${
speed_type
}
"
)
"
|| \
speed=
"
$(
<
"
${
speed_dir
}
/
${
speed_type
}
"
)
"
|| \
speed=
"
$(
<
"
${
speed_dir
}
/bios_limit"
)
"
|| \
speed=
"
$(
<
"
${
speed_dir
}
/bios_limit"
)
"
|| \
speed=
"
$(
<
"
${
speed_dir
}
/scaling_max_freq"
)
"
speed=
"
$(
<
"
${
speed_dir
}
/scaling_max_freq"
)
"
speed=
"
$((
speed
/
100000
))
"
speed=
"
$((
speed
/
100000
))
"
else
else
...
...
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