1
0
mirror of https://github.com/pgrondek/config.git synced 2024-11-22 12:03:43 +00:00

[i3blocks] Fix CPU block

This commit is contained in:
pgrondek 2019-05-27 23:58:01 +02:00
parent c4200e3812
commit 669b4a048d

View File

@ -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