diff options
| author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2025-11-04 16:38:41 +0000 |
|---|---|---|
| committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2025-11-04 16:38:41 +0000 |
| commit | 0fb4a5937293235346c1ba5af5891e58cea45953 (patch) | |
| tree | f693d0a6d1231cad6c4d7a4df12cd2bdf3a81075 /Scripts/.local/scripts/status/memory | |
| parent | 0d374a5f82b88177d2fdaf35d9c28080a8f35494 (diff) | |
| download | dotfiles-0fb4a5937293235346c1ba5af5891e58cea45953.tar.gz dotfiles-0fb4a5937293235346c1ba5af5891e58cea45953.tar.bz2 dotfiles-0fb4a5937293235346c1ba5af5891e58cea45953.zip | |
Small adjustments on other scripts
Diffstat (limited to 'Scripts/.local/scripts/status/memory')
| -rwxr-xr-x | Scripts/.local/scripts/status/memory | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Scripts/.local/scripts/status/memory b/Scripts/.local/scripts/status/memory index 2648deb..acac48f 100755 --- a/Scripts/.local/scripts/status/memory +++ b/Scripts/.local/scripts/status/memory @@ -1,8 +1,8 @@ #!/usr/bin/env sh -line=$(free -m | sed -n 2p); +line=$(free -m | tail -2); used=$(echo $line | awk '{print $3}'); available=$(echo $line | awk '{print $2}'); -value=$(echo "100 * $used / $available" | bc -l | xargs printf "%.2f" $1) +percentage=$(echo "100 * $used / $available" | bc -l | xargs printf "%.2f" $1) -echo "㊎ $(printf "%dMB" $used) $value%" +echo "㊎ $(printf "%dMB" $used) $percentage%" |
