aboutsummaryrefslogtreecommitdiff
path: root/i3blocks
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-12-17 20:03:44 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2019-12-17 20:03:44 +0100
commitf551289c9705c5ed2a028f9a6d37b13c98467508 (patch)
treec14318aaaacbe4e1925f9d3e36f7b98c39219fa6 /i3blocks
parent93b14ece7fbe75c09221621e49e16cc245f5b1de (diff)
downloadscripts-f551289c9705c5ed2a028f9a6d37b13c98467508.tar.gz
scripts-f551289c9705c5ed2a028f9a6d37b13c98467508.zip
i3cpu.sh now uses env vars to read temperature.
Diffstat (limited to 'i3blocks')
-rwxr-xr-xi3blocks/i3cpu.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/i3blocks/i3cpu.sh b/i3blocks/i3cpu.sh
index ed57025..471dcfd 100755
--- a/i3blocks/i3cpu.sh
+++ b/i3blocks/i3cpu.sh
@@ -5,7 +5,9 @@ case $BLOCK_BUTTON in
$(ps axch -o cmd:18,%cpu --sort=-%cpu | sed 10q)" ;;
esac
-temp=$(sensors | awk '/Package id/ {print $4}' | sed 's/+//' | sed 's/\..*//')
+temp="$(sensors |
+awk '/'"$CONFIG_SENSORS_TEMP_REGEX"'/ {print $'"$CONFIG_SENSORS_TEMP_COL"'}' |
+sed 's/+//; s/\..*//')"
warn=""
if [ "$temp" -lt 25 ]; then