summaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/command_output/README5
-rwxr-xr-xwidgets/command_output/command.example (renamed from widgets/command_output/command)0
-rw-r--r--widgets/system_information/README5
l---------widgets/system_information/system_information1
-rwxr-xr-xwidgets/system_information/system_information.g2v2
-rwxr-xr-xwidgets/system_updatestatus/system_update_status17
-rwxr-xr-xwidgets/system_updatestatus/system_update_status.ubuntu65
-rw-r--r--widgets/temperatures/README3
-rwxr-xr-xwidgets/temperatures/temperatures.default (renamed from widgets/temperatures/temperatures)0
-rw-r--r--widgets/weather/GetLatLangFromCity.php4
-rw-r--r--widgets/weather/README6
-rw-r--r--widgets/weather/update_weather.config17
-rw-r--r--widgets/weather/update_weather.config.sample23
-rw-r--r--widgets/weather/update_weather.php2
14 files changed, 52 insertions, 98 deletions
diff --git a/widgets/command_output/README b/widgets/command_output/README
index f73a0326..1e949b02 100644
--- a/widgets/command_output/README
+++ b/widgets/command_output/README
@@ -1,5 +1,6 @@
This widget is for an own command
+
The command "command" will be executed every time the widget is drawn, so please keep it short and fast.
The command have to provide two output files: "title" and "output".
-"title" is the title of the Widget.
-The "output" file is read line by line. And every line is drawn without wrap the lines if they are to long.
+"title" is the title for the widget.
+The "output" file is read line by line. And every line is drawn without wrap the line if it is to long.
diff --git a/widgets/command_output/command b/widgets/command_output/command.example
index 03b12b23..03b12b23 100755
--- a/widgets/command_output/command
+++ b/widgets/command_output/command.example
diff --git a/widgets/system_information/README b/widgets/system_information/README
index 946b5236..03ea2b22 100644
--- a/widgets/system_information/README
+++ b/widgets/system_information/README
@@ -1,5 +1,8 @@
This widget provides several information about the current system state.
+You must manually create a link to the corresponding script, for example:
+ln -s system_information.ubuntu system
+
The command "system_information" will be executed every time the widget is drawn, so please keep it short and fast.
The command "system_information" must provide several files with the infos.
The output files must begin with 01_ - 99_ for sort/position the info in the widget. For example "01_uptime", "02_load", etc.The values will be drawn in 2 columns except "system_version" and "kernel_version" they are drawn in a row.
@@ -9,4 +12,4 @@ Load: 0.32 Uptime: 10:24:42 up 88 days
You can include system_updatestatus and temperatures. But do not execute the system_updatestatus script (please read README of system_updatestatus)
-Please see the example! \ No newline at end of file
+Please see the example!
diff --git a/widgets/system_information/system_information b/widgets/system_information/system_information
deleted file mode 120000
index d61d4dfb..00000000
--- a/widgets/system_information/system_information
+++ /dev/null
@@ -1 +0,0 @@
-system_information.ubuntu \ No newline at end of file
diff --git a/widgets/system_information/system_information.g2v b/widgets/system_information/system_information.g2v
index 56480fa3..c0905624 100755
--- a/widgets/system_information/system_information.g2v
+++ b/widgets/system_information/system_information.g2v
@@ -12,7 +12,7 @@ SHOW_PROCESSES=1
SHOW_MEM_USAGE=1
SHOW_SWAP_USAGE=1
SHOW_ROOT_USAGE=1
-SHOW_VIDEO_USAGE=1
+SHOW_VIDEO_USAGE=0
SHOW_VDR_CPU_USAGE=1
SHOW_VDR_MEM_USAGE=1
diff --git a/widgets/system_updatestatus/system_update_status b/widgets/system_updatestatus/system_update_status
deleted file mode 100755
index 50bdc037..00000000
--- a/widgets/system_updatestatus/system_update_status
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-APTCHECK=/usr/lib/update-notifier/apt-check
-
-rm -f updates security_updates
-
-if [ ! -f ${APTCHECK} ]
-then
- exit
-fi
-
-RET=$(${APTCHECK} 2>&1)
-
-# updates
-echo $RET | cut -d";" -f1 > updates
-# security updates
-echo $RET | cut -d";" -f2 > security_updates
diff --git a/widgets/system_updatestatus/system_update_status.ubuntu b/widgets/system_updatestatus/system_update_status.ubuntu
index 23f4345a..50bdc037 100755
--- a/widgets/system_updatestatus/system_update_status.ubuntu
+++ b/widgets/system_updatestatus/system_update_status.ubuntu
@@ -1,62 +1,17 @@
#!/bin/bash
-# this script must be call from cron
-# please add a cron entry for this script
-# skin flatPlus only read the file "update_status"
+APTCHECK=/usr/lib/update-notifier/apt-check
+rm -f updates security_updates
-rm -f ./update_status
-
-# lent code from apticron, thank you!
-
-# Set $DIRCACHE
-eval `/usr/bin/apt-config shell DIRCACHE Dir::Cache`
-
-NOTIFY_HOLDS="0"
-NOTIFY_NEW="1"
-
-# get the list of packages which are pending an upgrade
-PKGNAMES=`/usr/bin/apt-get -q -y --ignore-hold --allow-unauthenticated -s dist-upgrade | \
- /bin/grep ^Inst | /usr/bin/cut -d\ -f2 | /usr/bin/sort`
-
-# creating the future last_run file
-TMPFILE="$(mktemp -t apticron.XXXXXXXXXX)"
-for p in $PKGNAMES; do
- echo $p >> $TMPFILE
-done
-
-# workaround to handle apt-get installing packages hold by aptitude. See #137771.
-APTITUDE_HOLDS=`grep "^State: 2" -B 2 /var/lib/aptitude/pkgstates 2>/dev/null |grep "^Package: .*$" |cut -d" " -f 2`
-DSELECT_HOLDS=`dpkg --get-selections |grep "hold$" |cut -f1`
-
-if [ "$NOTIFY_HOLDS" = "0" ]; then
- # packages hold by aptitude don't go to the upgrading candidates list
- for p in $APTITUDE_HOLDS; do
- PKGNAMES=`echo $PKGNAMES |sed "s/\(^\| \)$p\( \|$\)/ /g;s/^ //g"`
- done
- # packages hold by dselect don't go to the upgrading candidates list
- for p in $DSELECT_HOLDS; do
- PKGNAMES=`echo $PKGNAMES |sed "s/\(^\| \)$p\( \|$\)/ /g;s/^ //g"`
- done
+if [ ! -f ${APTCHECK} ]
+then
+ exit
fi
-if [ "$NOTIFY_NEW" = "0" ]; then
- # new packages don't go to the upgrading candidates list (see #531002)
- for p in $PKGNAMES; do
- if [ -z "`dpkg -s $p 2>/dev/null| grep '^Status: install ok installed'`" ] ; then
- PKGNAMES=`echo $PKGNAMES |sed "s/\(^\| \)$p\( \|$\)/ /g;s/^ //g"`
- fi
- done
-fi
-
-
-PKGPATH="/${DIRCACHE}archives/"
-for PKG in $PKGNAMES ; do
- VER=`LC_ALL=C /usr/bin/apt-cache policy $PKG | /bin/grep Candidate: | /usr/bin/cut -f 4 -d \ `
- VERFILE=`echo "$VER" | /bin/sed -e "s/:/%3a/g"`
- if ls ${PKGPATH}${PKG}_${VERFILE}_*.deb >& /dev/null ; then
- DEBS="$DEBS ${PKGPATH}${PKG}_${VERFILE}_*.deb"
- fi
- echo $PKG $VER >> ./update_status
-done
+RET=$(${APTCHECK} 2>&1)
+# updates
+echo $RET | cut -d";" -f1 > updates
+# security updates
+echo $RET | cut -d";" -f2 > security_updates
diff --git a/widgets/temperatures/README b/widgets/temperatures/README
index fc2247a8..5f22c359 100644
--- a/widgets/temperatures/README
+++ b/widgets/temperatures/README
@@ -1,5 +1,8 @@
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.
diff --git a/widgets/temperatures/temperatures b/widgets/temperatures/temperatures.default
index be764be0..be764be0 100755
--- a/widgets/temperatures/temperatures
+++ b/widgets/temperatures/temperatures.default
diff --git a/widgets/weather/GetLatLangFromCity.php b/widgets/weather/GetLatLangFromCity.php
index e05c1bc8..1ca7d1e3 100644
--- a/widgets/weather/GetLatLangFromCity.php
+++ b/widgets/weather/GetLatLangFromCity.php
@@ -18,8 +18,8 @@ if( !isset($data['results'][0]) ) {
$latitude = $data['results'][0]['geometry']['location']['lat'];
$longitude = $data['results'][0]['geometry']['location']['lng'];
-echo "latitude: ".$latitude."\n";
-echo "longitude: ".$longitude."\n";
+echo "Latitude = ".$latitude."\n";
+echo "Longitude = ".$longitude."\n";
echo "put these values in update_weather.config\n";
?>
diff --git a/widgets/weather/README b/widgets/weather/README
index 956c7a26..af7f985e 100644
--- a/widgets/weather/README
+++ b/widgets/weather/README
@@ -6,4 +6,8 @@ For example call the command from cron.daily.
You need php5 with command line support for this widget. For example in Ubuntu you need the package "php5-cli".
-Please configur your location and others in update_weather.config. Use php-script "GetLatLangFromCity.php" to get latitude & longitude from your location.
+Please move update_weather.config to update_weather.config.sample
+
+mv update_weather.config.sample update_weather.config
+
+Configure your location and others in update_weather.config. Use php-script "GetLatLangFromCity.php" to get latitude & longitude from your location.
diff --git a/widgets/weather/update_weather.config b/widgets/weather/update_weather.config
deleted file mode 100644
index f799c6d3..00000000
--- a/widgets/weather/update_weather.config
+++ /dev/null
@@ -1,17 +0,0 @@
-[main]
-# use GetLatLangFromCity.php to get latitude/langitude
-Latitude = 52.5200066
-Longitude = 13.404954
-# location shown in Skin
-LocationSkin = "Berlin"
-# Can be set to 'us', 'si', 'ca', 'uk' or 'auto' (see forecast.io API); default is auto
-Units = "si"
-DegreeSign = "°C"
-# Can be set to 'en', 'de', 'pl', 'es', 'fr', 'it', 'tet' or 'x-pig-latin' (see forecast.io API); default is 'en'
-Lang = "de"
-# convert . to , for german format
-ConvertPoint2Comma = 1
-# We have only 1000 api calls per day, so please only do one update per day!
-# Or request an own key for free at forecast.io
-ApiKey = "137f2d85a1f1db5762e5e073103541d2"
-
diff --git a/widgets/weather/update_weather.config.sample b/widgets/weather/update_weather.config.sample
new file mode 100644
index 00000000..f913d89f
--- /dev/null
+++ b/widgets/weather/update_weather.config.sample
@@ -0,0 +1,23 @@
+[main]
+
+; use GetLatLangFromCity.php to get latitude/langitude
+Latitude = 52.5200066
+Longitude = 13.404954
+
+; location shown in Skin
+LocationSkin = "Berlin"
+
+; Can be set to 'us', 'si', 'ca', 'uk' or 'auto' (see forecast.io API); default is auto
+Units = "si"
+DegreeSign = "°C"
+
+; Can be set to 'en', 'de', 'pl', 'es', 'fr', 'it', 'tet' or 'x-pig-latin' (see forecast.io API); default is 'en'
+Lang = "de"
+
+; convert . to , for german format
+ConvertPoint2Comma = 1
+
+; We have only 1000 api calls per day, so please only do one update per day!
+; Or request an own key for free at forecast.io
+ApiKey = "137f2d85a1f1db5762e5e073103541d2"
+
diff --git a/widgets/weather/update_weather.php b/widgets/weather/update_weather.php
index a35e89f4..4b4dbb86 100644
--- a/widgets/weather/update_weather.php
+++ b/widgets/weather/update_weather.php
@@ -71,9 +71,9 @@ foreach($conditions_week as $conditions) {
continue;
}
// we only have min & max so we must calc
+ $temp = round($conditions->getMaxTemperature(), 1);
if( $convertPoint == 1 )
$temp = str_replace(".", ",", $temp);
- $temp = round($conditions->getMaxTemperature(), 1);
fwrite($handle, $temp);
fwrite($handle, $degree_sign);
fclose($handle);