diff options
| author | louis <louis.braun@gmx.de> | 2015-01-06 06:07:48 +0100 |
|---|---|---|
| committer | louis <louis.braun@gmx.de> | 2015-01-06 06:07:48 +0100 |
| commit | acd552d5f37ec4882f624baf8cb860c001cfdd89 (patch) | |
| tree | 5545dbdf9b15d2bd1e0ff57c21f7b699a683570b /scripts | |
| parent | 8328a5d4d928bd81179ab03490eb59655d418b58 (diff) | |
| download | vdr-plugin-skindesigner-acd552d5f37ec4882f624baf8cb860c001cfdd89.tar.gz vdr-plugin-skindesigner-acd552d5f37ec4882f624baf8cb860c001cfdd89.tar.bz2 | |
added skin blackhole
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/README | 10 | ||||
| -rw-r--r-- | scripts/temperatures.default | 28 | ||||
| -rw-r--r-- | scripts/temperatures.g2v | 31 |
3 files changed, 69 insertions, 0 deletions
diff --git a/scripts/README b/scripts/README new file mode 100644 index 0000000..5f22c35 --- /dev/null +++ b/scripts/README @@ -0,0 +1,10 @@ +This Widget provide information about the system temperatures. + +You must manually create a link to the corresponding script, for example: +ln -s temperatures.default temperatures + +The command "temperatures" will be executed every time the widget is drawn, so please keep it short and fast. +The command can provide three temperatures: cpu, pc case and gpu temperature +The command can also be called from system information widget. So the output files must also begin with 01_ - 99_ for sort/position. + +Please install lm-sensors and configure it for your system. See the default script for an example. diff --git a/scripts/temperatures.default b/scripts/temperatures.default new file mode 100644 index 0000000..e942434 --- /dev/null +++ b/scripts/temperatures.default @@ -0,0 +1,28 @@ +#!/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 ;) + +OUTPUTFLDR="/tmp/skindesigner/" +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 ${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 "+" > ${OUTPUTFLDR}/cpu + +# pc case temp +#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 "+" > ${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" > ${OUTPUTFLDR}/gpu diff --git a/scripts/temperatures.g2v b/scripts/temperatures.g2v new file mode 100644 index 0000000..79d0774 --- /dev/null +++ b/scripts/temperatures.g2v @@ -0,0 +1,31 @@ +#!/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 ;) + +OUTPUTFLDR="/tmp/skindesigner" +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 ${OUTPUTFLDR}/cpu ${OUTPUTFLDR}/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 "Core")) +CPUTEMP[2]=${CPUTEMP[2]/+} # +36.0°C -> 36.0°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 "+" > ${OUTPUTFLDR}/pccase + +# 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" > ${OUTPUTFLDR}/gpu |
