dotfiles/dot_config/sway/executable_mem
2023-01-30 14:28:59 +01:00

8 lines
235 B
Bash

#!/bin/bash
# Show used and total memory
available=$(awk '/MemAvailable/ {$2=$2/1024; printf("%3.2f\n", $2)}' /proc/meminfo)
total=$(awk '/MemTotal/ {$2=$2/1024**2; printf("%3.1f\n", $2)}' /proc/meminfo )
echo "${available}"
echo ""