myhome/.local/bin/sb-cpu
Marcin Woźniak b4e8857524
Added nvim
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
2021-04-04 17:35:42 +02:00

7 lines
175 B
Bash
Executable File

#!/bin/bash
print_cpu() {
cpuUse=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print int(100 - $1)"%"}')
echo -e "💻 $cpuUse"
}
print_cpu