aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/status/memory
blob: acac48fc1b4c4ab6ec3bc9764ce67fb8d9707f24 (plain)
1
2
3
4
5
6
7
8
#!/usr/bin/env sh

line=$(free -m | tail -2);
used=$(echo $line | awk '{print $3}');
available=$(echo $line | awk '{print $2}');
percentage=$(echo "100 * $used / $available" | bc -l | xargs printf "%.2f" $1)

echo "㊎ $(printf "%dMB" $used) $percentage%"