summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2019-09-01 21:58:14 -0400
committerGitHub <noreply@github.com>2019-09-01 21:58:14 -0400
commit7bd563e16426b9b0e7aa8eed0370a1d692e31191 (patch)
treea6ed4286eb8e3a17291de5f4bc287f2af959cf8b
parent7dc7ab5ca6fc5efa81cd65603a1956f6856522c0 (diff)
parent38508b06dc35760b48d1aafa1c1a6026f50002c5 (diff)
Merge pull request #88 from mvonmaltitz/patch-1
Make ram-widget compatible for non-english OS
-rw-r--r--ram-widget/ram-widget.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/ram-widget/ram-widget.lua b/ram-widget/ram-widget.lua
index 3072068..a783b3c 100644
--- a/ram-widget/ram-widget.lua
+++ b/ram-widget/ram-widget.lua
@@ -42,7 +42,7 @@ local function getPercentage(value)
return math.floor(value / (total+total_swap) * 100 + 0.5) .. '%'
end
-watch('bash -c "free | grep -z Mem.*Swap.*"', 1,
+watch('bash -c "LANGUAGE=en_US.UTF-8 free | grep -z Mem.*Swap.*"', 1,
function(widget, stdout, stderr, exitreason, exitcode)
total, used, free, shared, buff_cache, available, total_swap, used_swap, free_swap =
stdout:match('(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*Swap:%s*(%d+)%s*(%d+)%s*(%d+)')