new eww
This commit is contained in:
5
home/programs/eww/src/scripts/cpu.sh
Executable file
5
home/programs/eww/src/scripts/cpu.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
cpu_idle=$(top -bn1 | awk '/Cpu\(s\)/ {print $8}')
|
||||
cpu_used=$(awk "BEGIN {print 100 - $cpu_idle}")
|
||||
|
||||
# Print only the numeric result
|
||||
printf "%.0f\n" "$cpu_used"
|
||||
Reference in New Issue
Block a user