mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-26 05:10:20 +00:00
cpu graph plugins
This commit is contained in:
parent
32a80803f6
commit
4afe5d48cb
2 changed files with 14 additions and 0 deletions
8
plugins/cpu_sys.sh
Executable file
8
plugins/cpu_sys.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CORE_COUNT=$(sysctl -n machdep.cpu.thread_count)
|
||||
CPU_SYS=$(ps -eo pcpu,user | grep -v $(whoami) | sed "s/[^ 0-9\.]//g" | awk "{sum+=\$1} END {print sum/(100.0 * $CORE_COUNT)}")
|
||||
sketchybar -m push cpu_sys 0 $CPU_SYS
|
||||
|
||||
|
||||
|
6
plugins/cpu_user.sh
Executable file
6
plugins/cpu_user.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/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
|
||||
|
Loading…
Reference in a new issue