We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2d43413 + cec25d9 commit 8858050Copy full SHA for 8858050
scripts/ram_percentage.sh
@@ -1,6 +1,7 @@
1
#!/usr/bin/env bash
2
3
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4
+export LANG=C
5
6
source "$CURRENT_DIR/helpers.sh"
7
@@ -15,7 +16,7 @@ print_ram_percentage() {
15
16
ram_percentage_format=$(get_tmux_option "@ram_percentage_format" "$ram_percentage_format")
17
18
if command_exists "free"; then
- free | awk -v format="$ram_percentage_format" '$1 == "Mem:" {printf(format, 100*$3/$2)}'
19
+ free | awk -v format="$ram_percentage_format" '$1 ~ /Mem/ {printf(format, 100*$3/$2)}'
20
elif command_exists "vm_stat"; then
21
# page size of 4096 bytes
22
stats="$(vm_stat)"
0 commit comments