From f0c4ba03390f7853ba6a740e44185ddd05b8d865 Mon Sep 17 00:00:00 2001 From: Andreas Baulig Date: Mon, 20 May 2019 16:03:52 +0200 Subject: [PATCH] Set system locale to international Running `free` without any modifications will result in the output being localized into the current system-language (i.e. German if you're running a German install of Linux). The parsing of the `memory` script however relies on the output being in english (US). As an easy fix we just set the system locale tempoararily to 'C' (which is the _default_ language, i.e. english in case of `free`). --- .local/bin/statusbar/memory | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.local/bin/statusbar/memory b/.local/bin/statusbar/memory index dfd3d7b0..3eba15da 100755 --- a/.local/bin/statusbar/memory +++ b/.local/bin/statusbar/memory @@ -6,4 +6,7 @@ case $BLOCK_BUTTON in - Click to show memory hogs." ;; esac -free -h | awk '/^Mem:/ {print $3 "/" $2}' +# Set language to international or otherwise 'free' will output in the current +# system language +LC_ALL=C free -h | awk '/^Mem:/ {print $3 "/" $2}' +