X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/1bd178f68757099e6c9ccde1992ca5d519ccb8e5..bcd37ae4ae4f0e5d11ab6d8f6a9580e840447327:/widgets/weather.lua diff --git a/widgets/weather.lua b/widgets/weather.lua index 545e6d1..015f43a 100644 --- a/widgets/weather.lua +++ b/widgets/weather.lua @@ -13,6 +13,7 @@ local async = require("lain.asyncshell") local json = require("lain.util").dkjson local lain_icons = require("lain.helpers").icons_dir +local focused = require("awful.screen").focused local naughty = require("naughty") local wibox = require("wibox") @@ -60,7 +61,7 @@ local function worker(args) return string.format("%s: %s, %d - %d ", day, desc, tmin, tmax) end local weather_na_markup = args.weather_na_markup or " N/A " - local followmouse = args.followmouse or false + local followtag = args.followtag or false local settings = args.settings or function() end weather.widget = wibox.widget.textbox(weather_na_markup) @@ -70,8 +71,8 @@ local function worker(args) function weather.show(t_out) weather.hide() - if followmouse then - notification_preset.screen = mouse.screen + if followtag then + notification_preset.screen = focused() end if not weather.notification_text then