mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-19 18:37:12 +00:00
Windows: Fix wmic bugs
This commit is contained in:
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}"
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user