]> git.madduck.net Git - etc/awesome.git/blobdiff - widgets/contrib/redshift.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:

taskwarrior: asynchronous; #213 enhanced
[etc/awesome.git] / widgets / contrib / redshift.lua
index 8a768fb8fac0cde959157f968dccad2fd6bae3c1..fdda61f8ac1a67cb409235053c1685c25afd6e94 100644 (file)
@@ -46,7 +46,9 @@ end
 function redshift:attach(widget, fun)
     redshift.update_fun = fun or function() end
     if not redshift.pid then redshift:start() end
-    widget:buttons(awful.util.table.join(awful.button({}, 1, function () redshift:toggle() end)))
+    if widget then
+        widget:buttons(awful.util.table.join(awful.button({}, 1, function () redshift:toggle() end)))
+    end
 end
 
 return redshift