From a4cfb3c53d7c5dbd7904ccacb1c3f65773ef0c6f Mon Sep 17 00:00:00 2001 From: Martin Schirrmacher Date: Sun, 9 Nov 2014 16:49:57 +0100 Subject: add main menu widgets --- widgets/temperatures/README | 7 +++++++ widgets/temperatures/temperatures | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 widgets/temperatures/README create mode 100755 widgets/temperatures/temperatures (limited to 'widgets/temperatures') diff --git a/widgets/temperatures/README b/widgets/temperatures/README new file mode 100644 index 00000000..fc2247a8 --- /dev/null +++ b/widgets/temperatures/README @@ -0,0 +1,7 @@ +This Widget provide information about the system 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/widgets/temperatures/temperatures b/widgets/temperatures/temperatures new file mode 100755 index 00000000..75a35796 --- /dev/null +++ b/widgets/temperatures/temperatures @@ -0,0 +1,22 @@ +#!/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 3 files, cpu, gpu, case + +rm -f ./cpu ./pccase ./gpu + +# intel core-i cpu temp +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 + +# 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 -- cgit v1.2.3