mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 01:00:17 +00:00
memory [openbsd]: Fix crash
This commit is contained in:
2
neofetch
2
neofetch
@@ -1411,7 +1411,7 @@ get_memory() {
|
|||||||
|
|
||||||
# Mem used.
|
# Mem used.
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"OpenBSD"*) mem_used="$(($(vmstat | awk 'END{printf $4}') / 1024))" ;;
|
"OpenBSD"*) mem_used="$(($(vmstat | awk -F ' |M' 'END{printf $4}') / 1024))" ;;
|
||||||
*) mem_used="$((mem_total - mem_free))" ;;
|
*) mem_used="$((mem_total - mem_free))" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user