dotfiles/bottom_bar/plugins/cpu.sh
2023-11-18 20:56:03 +01:00

7 lines
153 B
Bash
Executable file

#!/bin/bash
cpu_percent=$(top -l 2 | grep -E "^CPU" | tail -1 | awk '{ print $3 + $5"%" }')
bottom_bar --set $NAME icon=󰍛 label="${cpu_percent}"