mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-23 11:53:02 +00:00
6 lines
238 B
Bash
Executable file
6 lines
238 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
CORE_COUNT=$(sysctl -n machdep.cpu.thread_count)
|
|
CPU_USER=$(ps -eo pcpu,user | grep $(whoami) | sed "s/[^ 0-9\.]//g" | awk "{sum+=\$1} END {print sum/(100.0 * $CORE_COUNT)}")
|
|
sketchybar -m push cpu_user 0 $CPU_USER
|
|
|