dotfiles/.scripts/memory.sh

5 lines
152 B
Bash
Raw Normal View History

2016-12-16 21:06:16 +00:00
#!/bin/bash
used=$(free | grep Mem | awk '{print $3/$2 * 100.0}')
sparks=$(spark 0 $used 100)
echo "Mem: $(echo "($used+0.5)/1" | bc)% [${sparks:1:1}]"