mirror of
https://github.com/dzaczek/Uconsole-i3.git
synced 2025-12-10 05:49:38 +00:00
initial commit
This commit is contained in:
commit
81b9fd515f
7 changed files with 789 additions and 0 deletions
10
scripts/rpitemp.sh
Executable file
10
scripts/rpitemp.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue