neodotfiles/user/.config/suckless/dwmblocks/scripts/block_cpu
2022-12-19 20:15:21 -04:00

3 lines
103 B
Bash
Executable file

#!/bin/bash
usage=$(top -b -n1 | grep "Cpu(s)" | awk '{print $2 + $4}')
echo -e "CPU: [${usage%.*}%] "