Don't attempt to spawn gui client if not set

This commit is contained in:
Stefano Mazzucco 2019-11-09 22:24:46 +00:00
parent c1272192d7
commit bdb814d67c
1 changed files with 4 additions and 2 deletions

View File

@ -124,14 +124,16 @@ function widget:init()
)
self.tooltip = awful.tooltip({ objects = { widget },})
self.gui_client = ""
self.gui_client = nil
self:update()
self:buttons(awful.util.table.join(
awful.button({ }, 3,
function ()
spawn_with_shell(self.gui_client)
if self.gui_client then
spawn_with_shell(self.gui_client)
end
end
)))
end