mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-18 18:07:12 +00:00
Windows: Add support for showing architecture in 'Distro:' output. eg. 'Windows 7 Ultimate 64-bit'
This commit is contained in:
2
1.1.md
2
1.1.md
@@ -37,6 +37,8 @@ systems it isn't packaged for yet!
|
|||||||
- Mac OS X: Added support for showing Max OS X build version.
|
- Mac OS X: Added support for showing Max OS X build version.
|
||||||
- You can toggle it using `--osx_buildversion` and `$osx_buildversion`.
|
- You can toggle it using `--osx_buildversion` and `$osx_buildversion`.
|
||||||
- Windows: Added support for showing Windows edition. eg. `Windows 7 Ultimate`
|
- Windows: Added support for showing Windows edition. eg. `Windows 7 Ultimate`
|
||||||
|
- Windows: Added support for showing windows architecture. eg `Windows 7 Ultimate 64-bit`
|
||||||
|
- You can toggle this using `--windows_bits` and `$windows_bits`.
|
||||||
|
|
||||||
|
|
||||||
**Window Manager:**
|
**Window Manager:**
|
||||||
|
|||||||
@@ -59,6 +59,10 @@ kernel_shorthand="on"
|
|||||||
# --osx_buildversion on/off
|
# --osx_buildversion on/off
|
||||||
osx_buildversion="on"
|
osx_buildversion="on"
|
||||||
|
|
||||||
|
# Show '64-bit' / '32-bit' in 'Distro:'
|
||||||
|
# --windows_bits on /off
|
||||||
|
windows_bits="on"
|
||||||
|
|
||||||
|
|
||||||
# Uptime
|
# Uptime
|
||||||
|
|
||||||
|
|||||||
13
fetch
13
fetch
@@ -79,6 +79,10 @@ kernel_shorthand="on"
|
|||||||
# --osx_buildversion on/off
|
# --osx_buildversion on/off
|
||||||
osx_buildversion="on"
|
osx_buildversion="on"
|
||||||
|
|
||||||
|
# Show '64-bit' / '32-bit' in 'Distro:'
|
||||||
|
# --windows_bits on /off
|
||||||
|
windows_bits="on"
|
||||||
|
|
||||||
|
|
||||||
# Uptime
|
# Uptime
|
||||||
|
|
||||||
@@ -402,7 +406,12 @@ case "$os" in
|
|||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
distro="$(wmic os get Caption /value)"
|
distro="$(wmic os get Caption /value)"
|
||||||
distro=${distro/Caption'='}
|
|
||||||
|
[ "$windows_bits" == "on" ] && \
|
||||||
|
distro+=" $(wmic os get OSArchitecture /value)"
|
||||||
|
|
||||||
|
# Strip crap from the output of wmic
|
||||||
|
distro=${distro//Caption'='}
|
||||||
distro=${distro//[[:space:]]/ }
|
distro=${distro//[[:space:]]/ }
|
||||||
distro=${distro// }
|
distro=${distro// }
|
||||||
distro=${distro/Microsoft }
|
distro=${distro/Microsoft }
|
||||||
@@ -1892,6 +1901,7 @@ usage () { cat << EOF
|
|||||||
|
|
||||||
Info:
|
Info:
|
||||||
--osx_buildversion Hide/Show Mac OS X build version.
|
--osx_buildversion Hide/Show Mac OS X build version.
|
||||||
|
--windows_bits on/off Hide/Show Windows architecture.
|
||||||
--speed_type Change the type of cpu speed to display.
|
--speed_type Change the type of cpu speed to display.
|
||||||
Possible values: current, min, max, bios,
|
Possible values: current, min, max, bios,
|
||||||
scaling_current, scaling_min, scaling_max
|
scaling_current, scaling_min, scaling_max
|
||||||
@@ -1992,6 +2002,7 @@ exit 1
|
|||||||
while [ "$1" ]; do
|
while [ "$1" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
# Info
|
# Info
|
||||||
|
--windows_bits) windows_bits="$2" ;;
|
||||||
--osx_buildversion) osx_buildversion="$2" ;;
|
--osx_buildversion) osx_buildversion="$2" ;;
|
||||||
--speed_type) speed_type="$2" ;;
|
--speed_type) speed_type="$2" ;;
|
||||||
--kernel_shorthand) kernel_shorthand="$2" ;;
|
--kernel_shorthand) kernel_shorthand="$2" ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user