nixos/home/common/optional/desktop/status-bar/sb-cpu-pct.sh

2 lines
76 B
Bash

echo $(top -bn 1 |grep "Cpu(s)" | awk '{print $2+$6 "%"}' | sed "s/\..//g")