naughty: Print notification content in "no screen" warning

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-04-17 15:21:02 +02:00
parent 3e75e800ad
commit 76266abcfa
1 changed files with 3 additions and 2 deletions

View File

@ -439,8 +439,9 @@ function naughty.notify(args)
local title = args.title or preset.title
local s = get_screen(args.screen or preset.screen or screen.focused())
if not s then
require("gears.debug").print_warning(
"naughty.notify: there is no screen available to display the notification.")
local err = "naughty.notify: there is no screen available to display the following notification:"
err = string.format("%s title='%s' text='%s'", err, tostring(title or ""), tostring(text or ""))
require("gears.debug").print_warning(err)
return
end
local ontop = args.ontop or preset.ontop