lcpz / lain

Awesome WM complements
GNU General Public License v2.0
1.05k stars 212 forks source link

updated current_call and forecast_call api calls #546

Closed quantumfate closed 1 year ago

quantumfate commented 1 year ago

Fixes #545

Example usage of the widget

-- Weather
local weathericon = wibox.widget.imagebox(theme.widget_weather)
theme.weather = lain.widget.weather({
    APPID = 'insert api key here',
    lat = '53.55073',
    lon = '9.99302',
    notification_preset = { font = "Noto Sans Mono Medium 10", fg = theme.fg_normal },
    weather_na_markup = markup.fontfg(theme.small_screen_font, "#eca4c4", "N/A "),
    settings = function()
        descr = weather_now["weather"][1]["description"]:lower()
        units = math.floor(weather_now["main"]["temp"])
       widget:set_markup(markup.fontfg(theme.small_screen_font, "#eca4c4", descr .. " @ " .. units .. "°C "))
     end
})

image

lcpz commented 1 year ago

As this is issue is important and the changes I required were trivial, I implemented them myself.