nixos-configs/eww/scripts/cpu.sh
2023-05-28 18:05:51 -04:00

2 lines
No EOL
135 B
Bash
Executable file

#!/usr/bin/env bash
grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}' | tr '.' ' ' | awk '{print $1}'