From f297ad1e997a828ad965033a90edb1041e7de82b Mon Sep 17 00:00:00 2001 From: Bruno Martins <56702404+brunoh3art@users.noreply.github.com> Date: Mon, 20 Oct 2025 11:01:44 -0300 Subject: [PATCH] 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 --- bin/omarchy-windows-vm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-windows-vm b/bin/omarchy-windows-vm index 47e9024..eaea401 100755 --- a/bin/omarchy-windows-vm +++ b/bin/omarchy-windows-vm @@ -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 ""