changed cpu_frequency outputs with @dylanaraps suggestions
This commit is contained in:
parent
e0269fb9b6
commit
d1f7c47e0c
5 changed files with 22 additions and 19 deletions
2
1.5.md
2
1.5.md
|
@ -11,7 +11,7 @@
|
|||
**Disk Usage**<br \>
|
||||
- Only display usage of local disks.
|
||||
**CPU Information**<br \>
|
||||
- Option to shorten CPU name to just name, model, name & model, or speed
|
||||
- Option to shorten CPU name to just name, speed, tiny, on, or off
|
||||
|
||||
### Ascii
|
||||
|
||||
|
|
|
@ -270,7 +270,7 @@ alias fetch2="fetch \
|
|||
scaling_current, scaling_min, scaling_max
|
||||
NOTE: This only support Linux with cpufreq.
|
||||
--cpu_shorthand type Shorten the output of CPU
|
||||
Possible values: name, model, name_model, speed
|
||||
Possible values: name, speed, tiny, on, off
|
||||
--kernel_shorthand on/off Shorten the output of kernel
|
||||
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
|
||||
--gpu_shorthand on/off Shorten the output of GPU
|
||||
|
|
|
@ -94,8 +94,8 @@ shell_version="off"
|
|||
speed_type="max"
|
||||
|
||||
# CPU shorthand
|
||||
# Decice to show name only, model only, or speed only
|
||||
# --cpu_shorthand name, model, name_model, speed, off
|
||||
# Decice to show name only, speed only, or short info
|
||||
# --cpu_shorthand name, speed, tiny, on, off
|
||||
cpu_shorthand="off"
|
||||
|
||||
|
||||
|
|
31
neofetch
31
neofetch
|
@ -114,8 +114,8 @@ shell_version="off"
|
|||
speed_type="max"
|
||||
|
||||
# CPU shorthand
|
||||
# Decice to show name only, model only, or speed only
|
||||
# --cpu_shorthand name, model, name_model, speed, off
|
||||
# Decice to show name only, speed only, or short info
|
||||
# --cpu_shorthand name, speed, tiny, on, off
|
||||
cpu_shorthand="off"
|
||||
|
||||
|
||||
|
@ -864,22 +864,25 @@ getcpu () {
|
|||
# Make the output of cpu shorter
|
||||
case "$cpu_shorthand" in
|
||||
"name")
|
||||
cpu=${cpu%-*}
|
||||
;;
|
||||
|
||||
"model")
|
||||
cpu=${cpu#*-}
|
||||
cpu=${cpu%% *}
|
||||
;;
|
||||
|
||||
"name_model")
|
||||
cpu=${cpu%@*}
|
||||
cpu=${cpu# }
|
||||
cpu=${cpu/@*}
|
||||
;;
|
||||
|
||||
"speed")
|
||||
cpu=${cpu#*@ }
|
||||
;;
|
||||
|
||||
"on")
|
||||
cpu=${cpu/Intel }
|
||||
cpu=${cpu/Core }
|
||||
cpu=${cpu/AMD }
|
||||
;;
|
||||
|
||||
"tiny")
|
||||
cpu=${cpu/Intel }
|
||||
cpu=${cpu/Core }
|
||||
cpu=${cpu/AMD }
|
||||
cpu=${cpu/@*}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
@ -2322,7 +2325,7 @@ usage () { cat << EOF
|
|||
scaling_current, scaling_min, scaling_max
|
||||
NOTE: This only support Linux with cpufreq.
|
||||
--cpu_shorthand type Shorten the output of CPU
|
||||
Possible values: name, model, name_model, speed
|
||||
Possible values: name, speed, tiny, on, off
|
||||
--kernel_shorthand on/off Shorten the output of kernel
|
||||
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
|
||||
--gpu_shorthand on/off Shorten the output of GPU
|
||||
|
|
|
@ -36,7 +36,7 @@ NOTE: This only support Linux with cpufreq.
|
|||
.B \--cpu_shorthand 'type'
|
||||
Shorten the output of CPU
|
||||
.br
|
||||
Possible values: name, model, name_model, speed
|
||||
Possible values: name, speed, tiny, on, off
|
||||
.TP
|
||||
.B \--kernel_shorthand 'on/off'
|
||||
Shorten the output of kernel
|
||||
|
|
Loading…
Reference in a new issue