neodotfiles/user/.config/suckless/dwmblocks/scripts/block_cpu

4 lines
103 B
Text
Raw Normal View History

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