summaryrefslogtreecommitdiff
path: root/widgets/temperatures
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-11-16 12:43:30 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-11-16 12:43:30 +0100
commitefdb12a81dd96d913651b8b2bd5bbcbd8b135cbb (patch)
tree1c8b26612abe39c49fd494c32ea33554bcbaff55 /widgets/temperatures
parentff62c44e6cfdf5b015d04256341e950de76c6b92 (diff)
downloadskin-flatplus-efdb12a81dd96d913651b8b2bd5bbcbd8b135cbb.tar.gz
skin-flatplus-efdb12a81dd96d913651b8b2bd5bbcbd8b135cbb.tar.bz2
update widgets
Diffstat (limited to 'widgets/temperatures')
-rwxr-xr-xwidgets/temperatures/temperatures9
-rwxr-xr-xwidgets/temperatures/temperatures.g2v32
2 files changed, 38 insertions, 3 deletions
diff --git a/widgets/temperatures/temperatures b/widgets/temperatures/temperatures
index 75a35796..56259ddd 100755
--- a/widgets/temperatures/temperatures
+++ b/widgets/temperatures/temperatures
@@ -6,7 +6,7 @@
# if the script is executed from system_information script set the locale back for "°C"
LANG=de_DE.UTF-8
-# there can be 3 files, cpu, gpu, case
+# there can be 4 files, cpu, gpu, pccase, motherboard
rm -f ./cpu ./pccase ./gpu
@@ -14,9 +14,12 @@ rm -f ./cpu ./pccase ./gpu
sensors -A coretemp-isa-0000 | grep "Core 0" | awk '{print $3}' | tr -d "+" > ./cpu
# pc case temp
-sensors -A acpitz-virtual-0 | grep "temp1" | awk '{print $2}' | tr -d "+" > ./pccase
+#sensors -A acpitz-virtual-0 | grep "temp1" | awk '{print $2}' | tr -d "+" > ./pccase
+
+# motherboard temp
+sensors -A acpitz-virtual-0 | grep "temp1" | awk '{print $2}' | tr -d "+" > ./motherboard
# nvidia gpu temp
# nvidia-settings must be run as the user of the x server
GPU=`nvidia-settings -c :0 -t -query GPUCoreTemp | head -n 1`
-echo "$GPU°C" > ./gpu
+echo "${GPU}°C" > ./gpu
diff --git a/widgets/temperatures/temperatures.g2v b/widgets/temperatures/temperatures.g2v
new file mode 100755
index 00000000..7da4d68e
--- /dev/null
+++ b/widgets/temperatures/temperatures.g2v
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# please update this script to fit your needs
+# this script is call every time the widget will be drawn, so keep it short and fast ;)
+
+# if the script is executed from system_information script set the locale back for "°C"
+LANG=de_DE.UTF-8
+
+# there can be 4 files, cpu, gpu, pccase, motherboard
+
+rm -f ./cpu ./pccase ./gpu
+
+# intel core-i cpu temp
+#sensors -A coretemp-isa-0000 | grep "Core 0" | awk '{print $3}' | tr -d "+" > ./cpu
+
+# cpu temp
+CPUTEMP=($(sensors -A | grep "CPU Temperature"))
+CPUTEMP[2]=${CPUTEMP[2]/+}
+#echo "${CPUTEMP[2]/./,}" > ./cpu # 36,0°C
+echo "${CPUTEMP[2]%.*}°C" > ./cpu # 36°C
+
+# pc case temp
+#sensors -A acpitz-virtual-0 | grep "temp1" | awk '{print $2}' | tr -d "+" > ./pccase
+MBTEMP=($(sensors -A | grep "MB Temperature"))
+MBTEMP[2]=${MBTEMP[2]/+}
+#echo "${MBTEMP[2]/./,}" > ./pccase # 36,0°C
+echo "${MBTEMP[2]%.*}°C" > ./pccase # 36°C
+
+# nvidia gpu temp
+# nvidia-settings must be run as the user of the x server
+GPU=$(nvidia-settings -c :0 -t -query GPUCoreTemp | head -n 1)
+echo "${GPU}°C" > ./gpu