From: Michael Mrozek Date: Fri, 30 Nov 2012 01:12:02 +0000 (+0100) Subject: op_datetime.sh: Disable screensaver when syncing time over internet X-Git-Tag: sz_153~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74dc55add0c0122ffa6c159e8f290729ca60c5c0;p=openpandora.oe.git op_datetime.sh: Disable screensaver when syncing time over internet --- diff --git a/recipes/pandora-system/pandora-scripts/op_datetime.sh b/recipes/pandora-system/pandora-scripts/op_datetime.sh index 2d301af..3debe69 100644 --- a/recipes/pandora-system/pandora-scripts/op_datetime.sh +++ b/recipes/pandora-system/pandora-scripts/op_datetime.sh @@ -62,6 +62,11 @@ case $mainsel in fi ;; "sync") + screensaver_enabled=true + if xset q | grep -A2 'Screen Saver' | grep -q 'timeout:.*\<0\>.*cycle'; then + screensaver_enabled=false + fi + xset s off ( test -e /etc/init.d/ntpd && sudo /etc/init.d/ntpd stop sudo ntpdate pool.ntp.org @@ -71,6 +76,9 @@ case $mainsel in --text="Syncing with time server...\nPlease wait a while..." \ --pulsate test -e /etc/init.d/ntpd && sudo /etc/init.d/ntpd start + if $screensaver_enabled; then + xset s on + fi ;; esac done