aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/status
diff options
context:
space:
mode:
authordx <aryadevchavali1@gmail.com>2020-07-09 22:08:01 +0100
committerdx <aryadevchavali1@gmail.com>2020-07-09 22:10:05 +0100
commit159b684f949e1768b36b26720d47ab19382f5144 (patch)
tree087e5a2849fddddaeb732c307832212d41d83c0d /Scripts/.local/scripts/status
parent7e3e104baccc34b5583f7695f1a4d3768541fc94 (diff)
downloaddotfiles-159b684f949e1768b36b26720d47ab19382f5144.tar.gz
dotfiles-159b684f949e1768b36b26720d47ab19382f5144.tar.bz2
dotfiles-159b684f949e1768b36b26720d47ab19382f5144.zip
+memory script for dwmbar
Diffstat (limited to 'Scripts/.local/scripts/status')
-rwxr-xr-xScripts/.local/scripts/status/memory7
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 "%"