]> git.madduck.net Git - etc/awesome.git/blobdiff - widgets/weather.lua

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge branch 'patch-3' of https://github.com/andering/lain into andering-patch-3
[etc/awesome.git] / widgets / weather.lua
index 3f9253faf20520dd3fb79b17cd40ec6113e0343b..ca0ceed7cf639a27c26594ca1c81162b9e65b32a 100644 (file)
@@ -66,6 +66,10 @@ local function worker(args)
             notification_preset.screen = mouse.screen
         end
 
+        if not weather.notification_text then
+            weather.forecast_update()
+        end
+
         weather.notification = naughty.notify({
             text    = weather.notification_text,
             icon    = weather.icon_path,
@@ -106,8 +110,6 @@ local function worker(args)
                         weather.notification_text = weather.notification_text .. "\n"
                     end
                 end
-            else
-                weather.notification_text = 0
             end
         end)
     end