added openweather api key to config; some fixes

This commit is contained in:
Johannes Findeisen 2020-07-07 04:40:17 +02:00
commit 2e77d946c1
No known key found for this signature in database
GPG key ID: 2128DE136929E573
3 changed files with 4 additions and 3 deletions

View file

@ -7,7 +7,8 @@ config.font_awesome_size = "9"
config.font_xterm = "Source Code Pro"
config.font_xterm_size = "10"
config.titlebars_enabled = "true"
config.cityid = "2810284" -- (Westerland, DE)
config.openweather_api_key = "INSERT_KEY_HERE"
config.cityid = "INSERT_CITY_ID_HERE"
config.quake_width = 1024
config.quake_height = 768
config.autostart = {

View file

@ -101,7 +101,7 @@ multimediamenu = {
{ "k3b", "/usr/bin/k3b", "/usr/share/icons/hicolor/48x48/apps/k3b.png" },
{ "k9copy", "/usr/bin/k9copy", "/usr/share/icons/hicolor/48x48/actions/k9copy.png" },
{ "kaffeine", "/usr/bin/kaffeine", "/usr/share/icons/hicolor/scalable/apps/kaffeine.svg" },
{ "mediathek", "/usr/bin/mediathek", "/usr/share/pixmaps/MediathekView.svg" },
{ "mediathekview", "/usr/bin/mediathekview", "/usr/share/icons/hicolor/scalable/apps/mediathekview.svg/MediathekView.svg" },
{ "spotify", "/usr/bin/spotify-tray", "/usr/share/pixmaps/spotify-client.png" },
{ "tvbrowser", "/usr/bin/tvbrowser", "/usr/share/icons/hicolor/48x48/apps/tvbrowser.png" },
{ "vlc", "/usr/bin/vlc", "/usr/share/icons/hicolor/48x48/apps/vlc.png" },

View file

@ -137,6 +137,7 @@ local thermalwidget = wibox.widget.textbox()
vicious.register(thermalwidget, vicious.widgets.thermal, "$1°C ", 20, config.thermal_zone )
local myweather = lain.widget.weather({
APPID = config.openweather_api_key,
city_id = config.cityid,
notification_preset = { font = beautiful.font },
notification_text_fun = function (wn)
@ -146,7 +147,6 @@ local myweather = lain.widget.weather({
local desc = wn["weather"][1]["description"]
return string.format("<b>%s</b>: %s, %d°C/%d°C ", day, desc, tmin, tmax)
end,
})
myweather.attach(myweather.icon)