Files
dots/legacy/polybar/scripts/memory.sh
2021-04-03 11:58:19 +02:00

10 lines
229 B
Bash
Executable File

#!/bin/sh
case "$1" in
--popup)
notify-send "Memory (%)" "$(ps axch -o cmd:10,pmem k -pmem | head | awk '$0=$0"%"' )"
;;
*)
echo "$(free -h --si | awk '/^Mem:/ {print $3 "/" $2}')"
;;
esac