1
0
mirror of https://github.com/pgrondek/config.git synced 2024-11-22 20:13:43 +00:00
config/i3blocks/cpu

9 lines
297 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
2019-05-27 21:58:01 +00:00
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
echo $utilisation $load $temperature