nixos-configs/configs/eww/scripts/cpu.sh

2 lines
135 B
Bash
Raw Normal View History

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