mirror of
https://github.com/dzaczek/Uconsole-i3.git
synced 2025-12-06 03:49:41 +00:00
10 lines
249 B
Bash
Executable file
10 lines
249 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Get the CPU temperature
|
|
cpu_temp_milli=$(cat /sys/class/thermal/thermal_zone0/temp)
|
|
|
|
# Convert to degrees Celsius
|
|
cpu_temp=$(awk -v temp="$cpu_temp_milli" 'BEGIN {printf "%.1f", temp/1000}')
|
|
|
|
# Output the temperature
|
|
echo "$cpu_temp"
|