bib2html.py: Add incollection bibtype
[shutils.git] / dotfiles / conky / tempinfo.sh
1 #!/bin/dash
2 #
3 # Stefan Huber <shuber2@gmail.com>
4 # Displays some temperature info
5
6
7 if [ -f /proc/acpi/ibm/thermal ]
8 then
9 info=`cat /proc/acpi/ibm/thermal | sed "s/^.*://" `
10
11 #1 ??, THM0, strongly reacts on heat at the cooling gills. reacts on cpu
12 #2 DVD: reacts on heat at the dvd drive
13 #3 express card: 31°C REACTS ON HEAT ON PC-CARD SLOT
14 #4 agp, gets active when switched to discrete graphics, reacts on load
15 #5 disappears when bat0 is plugged off --> ~50°C always
16 #6 thinkwiki thinks this is for bat1
17 #7 disappears when bat0 is plugged off --> ~val of bat temp through smapi
18 #8 thinkwiki thinks this is for bat1
19 #9 hdd: 33°C REACTS ON HEAD AT THE HARD DISC AREA
20 #10 igp, reacts on gtkperf
21 #11 heatsink? slowly reacts on heat at cooling gill. slowly reacts on cpu
22
23 cpusocket=`echo $info | awk ' { print $1 } '`
24 dvd=`echo $info | awk ' { print $2 } '`
25 excard=`echo $info | awk ' { print $3 } '`
26 atigpu=`echo $info | awk ' { print $4 } '`
27 hdd=`echo $info | awk ' { print $9 } '`
28 intelgpu=`echo $info | awk ' { print $10 } '`
29 heatsink=`echo $info | awk ' { print $11 } '`
30
31 #No equivalent in $info!! Reacts more directly to load than thm0. Due
32 #to acpi info, this is cpu.
33 cpu=`cat /sys/devices/virtual/thermal/thermal_zone1/temp | awk ' { print $1/1000 } '`
34
35 echo -n "cpu:$cpu°C cpus:$cpusocket°C"
36
37 if [ $intelgpu != "-1" ]; then
38 echo -n " igp:$intelgpu°C"
39 fi
40
41 if [ $atigpu != "-1" ]; then
42 echo -n " agp:$atigpu°C"
43 fi
44
45 echo ""
46 echo "hs:$heatsink°C ec:$excard°C hdd:$hdd°C dvd:$dvd°C"
47 else
48 cpu=`cat /sys/devices/virtual/thermal/thermal_zone0/temp | awk ' { print $1/1000 } '`
49 echo "cpu: $cpu°C"
50 fi
51
52
53
54