Files
nixos-config/home/programs/eww/src/scripts/memory.sh
Elias Schröter 6f64253c4b permissions
correct permissions of the scripts
2026-04-03 18:09:20 +02:00

7 lines
191 B
Bash
Executable File

mem_info=$(free | grep Mem)
used=$(echo "$mem_info" | awk '{print $3}')
total=$(echo "$mem_info" | awk '{print $2}')
mem_used=$(awk "BEGIN {print int($used/$total * 100)}")
echo "$mem_used"