mirror of
https://github.com/Mastermindzh/dotfiles.git
synced 2025-08-13 04:37:43 +02:00
new rice
This commit is contained in:
12
i3/scripts/blocks/temp.sh
Normal file
12
i3/scripts/blocks/temp.sh
Normal 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
|
Reference in New Issue
Block a user