mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 23:49:56 +00:00
Minimal i3 setup
This commit is contained in:
18
dotfiles/desktop/.config/i3blocks/scripts/temperature
Executable file
18
dotfiles/desktop/.config/i3blocks/scripts/temperature
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
t=$(cat /sys/class/thermal/thermal_zone0/temp 2>/dev/null)
|
||||
[ -n "$t" ] || exit 0
|
||||
|
||||
temp=$((t / 1000))
|
||||
|
||||
if [ "$temp" -ge 85 ]; then
|
||||
color="#c7162b"
|
||||
elif [ "$temp" -ge 70 ]; then
|
||||
color="#e95420"
|
||||
else
|
||||
color="#d0d0d0"
|
||||
fi
|
||||
|
||||
echo "CPU ${temp}°C"
|
||||
echo "CPU ${temp}°C"
|
||||
echo "$color"
|
||||
Reference in New Issue
Block a user