Windows: Fix wmic bugs
This commit is contained in:
parent
9ebdf2b797
commit
0549cfc9aa
1 changed files with 3 additions and 3 deletions
6
neofetch
6
neofetch
|
@ -1025,7 +1025,7 @@ get_gpu() {
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
gpu="$(wmic path Win32_VideoController get caption /value)"
|
gpu="$(wmic path Win32_VideoController get caption /value)"
|
||||||
gpu="${gpu/Caption'='}"
|
gpu="${gpu//Caption'='}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Haiku")
|
"Haiku")
|
||||||
|
@ -1304,10 +1304,10 @@ get_resolution() {
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
width="$(wmic path Win32_VideoController get CurrentHorizontalResolution /value)"
|
width="$(wmic path Win32_VideoController get CurrentHorizontalResolution /value)"
|
||||||
width="${width/CurrentHorizontalResolution'='/}"
|
width="${width//CurrentHorizontalResolution'='/}"
|
||||||
|
|
||||||
height="$(wmic path Win32_VideoController get CurrentVerticalResolution /value)"
|
height="$(wmic path Win32_VideoController get CurrentVerticalResolution /value)"
|
||||||
height="${height/CurrentVerticalResolution'='/}"
|
height="${height//CurrentVerticalResolution'='/}"
|
||||||
|
|
||||||
[[ "$width" ]] && resolution="${width}x${height}"
|
[[ "$width" ]] && resolution="${width}x${height}"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue