s.widget or it will only work on one screen

This commit is contained in:
Thomas Forgione 2018-09-17 09:20:54 +02:00
parent 25cd28023f
commit a44cef719e
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 5 additions and 3 deletions

View File

@ -39,12 +39,14 @@ end
function update_background_widget(s)
naughty.notify({text="test"})
local margin = 25
awful.spawn.easy_async_with_shell(":", function()
if widget ~= nil then
widget:remove()
if s.widget ~= nil then
s.widget:remove()
end
local f = io.open(todo_path, "rb")
@ -84,7 +86,7 @@ function update_background_widget(s)
background_widget:struts({left=0, right=0, top=0, bottom=0})
widget = background_widget
s.widget = background_widget
end