3030 Specify a path to a custom config file.
3131. PARAMETER noimage
3232 Do not display any image or logo; display information only.
33- . PARAMETER legacylogo
34- Use legacy Windows logo.
33+ . PARAMETER switchlogo
34+ Switch the default Windows logo.
3535. PARAMETER blink
3636 Make the logo blink.
3737. PARAMETER stripansi
6565 [switch ][alias (' g' )]$genconf ,
6666 [string ][alias (' c' )]$configpath ,
6767 [switch ][alias (' n' )]$noimage ,
68- [switch ][alias (' l' )]$legacylogo ,
68+ [switch ][alias (' l' )]$switchlogo ,
6969 [switch ][alias (' b' )]$blink ,
7070 [switch ][alias (' s' )]$stripansi ,
7171 [switch ][alias (' a' )]$all ,
@@ -171,7 +171,8 @@ if ($help) {
171171
172172# ===== VARIABLES =====
173173$cimSession = New-CimSession
174- $t = if ($blink ) { " 5" } else { " 1" }
174+ $buildVersion = " $ ( [System.Environment ]::OSVersion.Version) "
175+ $legacylogo = $buildVersion -like " 6.1*"
175176
176177
177178# ===== CONFIGURATION =====
@@ -207,8 +208,8 @@ $defaultConfig = @'
207208# $image = "~/winfetch.png"
208209# $noimage = $true
209210
210- # Use legacy Windows logo
211- # $legacylogo = $true
211+ # Switch the default Windows logo
212+ # $switchlogo = $true
212213
213214# Make the logo blink
214215# $blink = $true
@@ -312,6 +313,8 @@ if ($config.GetType() -eq [string]) {
312313 $config += @ (" blank" , " colorbar" )
313314}
314315
316+ $t = if ($blink ) { " 5" } else { " 1" }
317+ if ($switchlogo ) { $legacylogo = -not $legacylogo }
315318
316319# ===== IMAGE =====
317320$img = if (-not $noimage ) {
@@ -454,14 +457,14 @@ function info_motherboard {
454457function info_title {
455458 return @ {
456459 title = " "
457- content = " ${e} [1;34m{0}${e} [0m@${e} [1;34m{1}${e} [0m" -f [Environment ]::UserName, $env: COMPUTERNAME
460+ content = " ${e} [1;34m{0}${e} [0m@${e} [1;34m{1}${e} [0m" -f [System. Environment ]::UserName, $env: COMPUTERNAME
458461 }
459462}
460463
461464
462465# ===== DASHES =====
463466function info_dashes {
464- $length = [Environment ]::UserName.Length + $env: COMPUTERNAME.Length + 1
467+ $length = [System. Environment ]::UserName.Length + $env: COMPUTERNAME.Length + 1
465468 return @ {
466469 title = " "
467470 content = " -" * $length
@@ -483,11 +486,7 @@ function info_computer {
483486function info_kernel {
484487 return @ {
485488 title = " Kernel"
486- content = if ($IsWindows -or $PSVersionTable.PSVersion.Major -eq 5 ) {
487- " $ ( [System.Environment ]::OSVersion.Version) "
488- } else {
489- " $ ( uname - r) "
490- }
489+ content = $buildVersion
491490 }
492491}
493492
0 commit comments