Commit Graph

7 Commits

Author SHA1 Message Date
Arthur Axel 'fREW' Schmidt cf81341fc9 Surface {when} in local time for weather widget
Here's how I use this:

      local weather_widget = function(
        code,
        url,
        name
      )
        local actual_widget = wibox.widget.textbox()
        local actual_tooltip = awful.tooltip({ objects = { actual_widget } });

        actual_widget:buttons(awful.util.table.join(
          awful.button({}, 1, function () awful.spawn("firefox '" .. url .. os.time() .. "'") end)
        ))

        vicious.register(actual_widget, vicious.widgets.weather,
          function (widget, args)
            actual_tooltip:set_text(
              "City: " .. args["{city}"] ..
                "\nWind: " .. args["{windmph}"] .. "mph " ..
                "\nSky: " .. args["{sky}"] ..
                "\nHumidity: " .. args["{humid}"] ..
                "\nMeasured at: " .. os.date("%F %T", args["{when}"]))
            return name .. " " .. args["{tempf}"] .. "°F"
        end, 60 * 10, code)

        return actual_widget
      end
2019-05-21 21:31:28 +07:00
Nguyễn Gia Phong 92a2138296 Let existing async wtype use helpers.setasyncall 2019-05-15 16:12:24 +07:00
Nguyễn Gia Phong 1d96075f6c Clean up spawn and widget types using it 2019-05-14 13:32:28 +07:00
Nguyễn Gia Phong 5a0573ebef Fallback asynchronous widget types to use spawn.lua
pkg_all was also optimized and use more updated package manager front-ends
2019-05-13 13:21:17 +07:00
Nguyễn Gia Phong 36abb4f26c Update weather widget type to use Awesome async API
Timeout for fetching data could be removed
since this widget would run on another thread.
2019-02-12 20:43:45 +07:00
Nguyễn Gia Phong 94037efc6c Update NOAA link used by weather_all to HTTPS
Thank @yipengsun for the catch. Close #73
2019-02-05 16:21:01 +07:00
mutlusun 602eada652
move weather widget to match new layout 2017-01-26 10:40:39 +01:00