This commit is contained in:
2017-12-06 18:30:31 +01:00
parent 6bb44f3835
commit 77b96c3749
14 changed files with 219 additions and 8 deletions

12
i3/scripts/blocks/temp.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
temp=$(sensors | # execute sensors
grep -w "Core 0:" | # grep for the first core
sed 's/([^)]*)//g' | # filter
tr -s " " | # remove whitespace
sed -e 's/Core 0\(.*\):/\1/' | # get value between Core 0 and :
cut -c 3- | rev | cut -c 7- | rev #remove clutter
)
# echo out the result
echo $temp°C