mirror of
https://github.com/LukeHagar/omarchy.git
synced 2025-12-06 04:20:23 +00:00
fix: universal RAM detection (locale-independent) (#2566)
* fix: make RAM detection compatible with all locales (free output in any language) * Look at total RAM, not just free --------- Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
@@ -58,8 +58,8 @@ Categories=System;Virtualization;
|
||||
EOF
|
||||
|
||||
# Get system resources
|
||||
TOTAL_RAM=$(free -h | grep "^Mem:" | awk '{print $2}')
|
||||
TOTAL_RAM_GB=$(free -g | grep "^Mem:" | awk '{print $2}')
|
||||
TOTAL_RAM=$(free -h | awk 'NR==2 {print $2}')
|
||||
TOTAL_RAM_GB=$(awk 'NR==1 {printf "%d", $2/1024/1024}' /proc/meminfo)
|
||||
TOTAL_CORES=$(nproc)
|
||||
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user