diff options
author | dx <aryadevchavali1@gmail.com> | 2020-07-09 22:08:01 +0100 |
---|---|---|
committer | dx <aryadevchavali1@gmail.com> | 2020-07-09 22:10:05 +0100 |
commit | 159b684f949e1768b36b26720d47ab19382f5144 (patch) | |
tree | 087e5a2849fddddaeb732c307832212d41d83c0d | |
parent | 7e3e104baccc34b5583f7695f1a4d3768541fc94 (diff) | |
download | dotfiles-159b684f949e1768b36b26720d47ab19382f5144.tar.gz dotfiles-159b684f949e1768b36b26720d47ab19382f5144.tar.bz2 dotfiles-159b684f949e1768b36b26720d47ab19382f5144.zip |
+memory script for dwmbar
-rwxr-xr-x | Scripts/.local/scripts/status/memory | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Scripts/.local/scripts/status/memory b/Scripts/.local/scripts/status/memory new file mode 100755 index 0000000..eeaf7af --- /dev/null +++ b/Scripts/.local/scripts/status/memory @@ -0,0 +1,7 @@ +#!/bin/bash + +line=$(free -m | sed -n 2p); +used=$(echo $line | awk '{print $3}'); +available=$(echo $line | awk '{print $2}'); +echo "100 * $used / $available" | bc -l | xargs printf " Mem: %.2f" $1 +echo "%" |