Evie Litherland-Smith
be1d5fa798
Save reference for later Enable upower daemon and add simple bar with the essentials for now, TODO more later
15 lines
324 B
Bash
Executable file
15 lines
324 B
Bash
Executable file
#!/bin/sh
|
|
|
|
|
|
total="$(free -m | grep Mem: | awk '{ print $2 }')"
|
|
used="$(free -m | grep Mem: | awk '{ print $3 }')"
|
|
shared="$(free -m | grep Mem: | awk '{ print $5 }')"
|
|
free=$(expr $total - $used - $shared)
|
|
true_used=$(expr $shared + $used)
|
|
|
|
case $1 in
|
|
total) echo $total;;
|
|
used) echo $true_used;;
|
|
free) echo $free;;
|
|
esac
|