]> gitweb.fluxo.info Git - scripts.git/commitdiff
Loading weather conky just if config exist
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 6 Feb 2013 17:16:42 +0000 (15:16 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 6 Feb 2013 17:16:42 +0000 (15:16 -0200)
xconky

diff --git a/xconky b/xconky
index 269a1b045dcc51d835d73734b9054e29257875ac..17c5eb8467ba89ec2d725c9a7fb6447e11493380 100755 (executable)
--- a/xconky
+++ b/xconky
@@ -8,17 +8,20 @@ function xconky_start {
   # Default one
   conky &
 
-  # Give time for networking
-  sleep 60
+  # Weather
+  if [ -e "$HOME/.brweather.conf" ]; then
+    # Give time for networking
+    sleep 60
 
-  # Load weather data first
-  weather &> /dev/null
+    # Load weather data first
+    weather &> /dev/null
 
-  # Clear cache
-  brweather --clean-cache
+    # Clear cache
+    brweather --clean-cache
 
-  # Weather
-  conky -c ~/.conky/weather/conkyrc &
+    # Weather
+    conky -c ~/.conky/weather/conkyrc &
+  fi
 }
 
 # Battery level if on laptop