diff --git a/i3blocks/cpu b/i3blocks/cpu index ff0e51a..2e8d052 100755 --- a/i3blocks/cpu +++ b/i3blocks/cpu @@ -1,6 +1,6 @@ #!/usr/bin/env bash -utilisation=$(mpstat | awk '$12 ~ /[0-9.]+/ { print 100 - $12"%" }') +utilisation=$(mpstat 1 1 --dec=0 | tail -n 1 | awk '{print $3}' )% temperature_path=/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp1_input load="↑ $(awk '{print $1}' /proc/loadavg)" temperature=$(($(cat $temperature_path)/1000))°C