We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca50dc9 commit e5cd798Copy full SHA for e5cd798
winfetch.ps1
@@ -687,9 +687,16 @@ function info_theme {
687
688
# ===== CPU/GPU =====
689
function info_cpu {
690
+ $cpu = Get-CimInstance -ClassName Win32_Processor -Property Name,MaxClockSpeed -CimSession $cimSession
691
+ $cpuname = if ($cpu.Name.Contains('@')) {
692
+ ($cpu.Name -Split ' @ ')[0]
693
+ } else {
694
+ $cpu.Name
695
+ }
696
+ $cpufreq = [math]::round((([int]$cpu.MaxClockSpeed)/1000), 2)
697
return @{
698
title = "CPU"
- content = (Get-CimInstance -ClassName Win32_Processor -Property Name -CimSession $cimSession).Name
699
+ content = "${cpuname} @ ${cpufreq}GHz"
700
}
701
702
0 commit comments