summaryrefslogtreecommitdiff
path: root/widgets/temperatures
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-11-30 13:30:51 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-11-30 13:30:51 +0100
commit7077eba3c3bf4ff2f641b5873e414ad9c3c541ba (patch)
tree39d7c10226f65df47d9c4ae179bdd4c9d93753fa /widgets/temperatures
parent0e077a1ed82ca9bfb8e6f234f53bbb44400df86a (diff)
downloadskin-flatplus-7077eba3c3bf4ff2f641b5873e414ad9c3c541ba.tar.gz
skin-flatplus-7077eba3c3bf4ff2f641b5873e414ad9c3c541ba.tar.bz2
update widgets folders
Diffstat (limited to 'widgets/temperatures')
-rwxr-xr-xwidgets/temperatures/temperatures.default13
-rwxr-xr-xwidgets/temperatures/temperatures.g2v17
2 files changed, 18 insertions, 12 deletions
diff --git a/widgets/temperatures/temperatures.default b/widgets/temperatures/temperatures.default
index be764be0..5d823b5c 100755
--- a/widgets/temperatures/temperatures.default
+++ b/widgets/temperatures/temperatures.default
@@ -3,23 +3,26 @@
# 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 ;)
+OUTPUTFLDR="/tmp/skinflatplus/widgets/temperatures"
+mkdir -p ${OUTPUTFLDR}
+
# 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 ./motherboard
+rm -f ${OUTPUTFLDR}/cpu ${OUTPUTFLDR}/pccase ${OUTPUTFLDR}/gpu ${OUTPUTFLDR}/motherboard
# intel core-i cpu temp
-sensors -A coretemp-isa-0000 | grep "Core 0" | awk '{print $3}' | tr -d "+" > ./cpu
+sensors -A coretemp-isa-0000 | grep "Core 0" | awk '{print $3}' | tr -d "+" > ${OUTPUTFLDR}/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 "+" > ${OUTPUTFLDR}/pccase
# motherboard temp
-sensors -A acpitz-virtual-0 | grep "temp1" | awk '{print $2}' | tr -d "+" > ./motherboard
+sensors -A acpitz-virtual-0 | grep "temp1" | awk '{print $2}' | tr -d "+" > ${OUTPUTFLDR}/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" > ${OUTPUTFLDR}/gpu
diff --git a/widgets/temperatures/temperatures.g2v b/widgets/temperatures/temperatures.g2v
index 0f0472ff..cbac970b 100755
--- a/widgets/temperatures/temperatures.g2v
+++ b/widgets/temperatures/temperatures.g2v
@@ -3,12 +3,15 @@
# 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 ;)
+OUTPUTFLDR="/tmp/skinflatplus/widgets/temperatures"
+mkdir -p ${OUTPUTFLDR}
+
# 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 ./gpu ./pccase ./motherboard
+rm -f ${OUTPUTFLDR}/cpu ${OUTPUTFLDR}/gpu ${OUTPUTFLDR}/pccase ${OUTPUTFLDR}/motherboard
# intel core-i cpu temp
#sensors -A coretemp-isa-0000 | grep "Core 0" | awk '{print $3}' | tr -d "+" > ./cpu
@@ -16,19 +19,19 @@ rm -f ./cpu ./gpu ./pccase ./motherboard
# cpu temp
CPUTEMP=($(sensors -A | grep "CPU Temperature"))
CPUTEMP[2]=${CPUTEMP[2]/+} # +36.0°C -> 36.0°C
-#echo "${CPUTEMP[2]/./,}" > ./cpu # 36,0°C
-echo "${CPUTEMP[2]%.*}°C" > ./cpu # 36°C
+#echo "${CPUTEMP[2]/./,}" > ${OUTPUTFLDR}/cpu # 36,0°C
+echo "${CPUTEMP[2]%.*}°C" > ${OUTPUTFLDR}/cpu # 36°C
# 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 "+" > ${OUTPUTFLDR}/pccase
# motherboard temp
MBTEMP=($(sensors -A | grep "MB Temperature"))
MBTEMP[2]=${MBTEMP[2]/+} # +36.0°C -> 36.0°C
-#echo "${MBTEMP[2]/./,}" > ./motherboard # 36,0°C
-echo "${MBTEMP[2]%.*}°C" > ./motherboard # 36°C
+#echo "${MBTEMP[2]/./,}" > ${OUTPUTFLDR}/motherboard # 36,0°C
+echo "${MBTEMP[2]%.*}°C" > ${OUTPUTFLDR}/motherboard # 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
+echo "${GPU}°C" > ${OUTPUTFLDR}/gpu