2015-01-10 18:44:30 +01:00
|
|
|
---------------------------------------------------------------------------
|
|
|
|
-- @author Uli Schlachter <psychon@znc.in>
|
|
|
|
-- @copyright 2014 Uli Schlachter
|
2015-02-22 22:25:09 +01:00
|
|
|
-- @module naughty
|
2015-01-10 18:44:30 +01:00
|
|
|
---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
local naughty = require("naughty.core")
|
2019-04-28 22:08:31 +02:00
|
|
|
local capi = {awesome = awesome}
|
2015-01-10 18:44:30 +01:00
|
|
|
if dbus then
|
|
|
|
naughty.dbus = require("naughty.dbus")
|
|
|
|
end
|
|
|
|
|
2019-04-06 04:16:44 +02:00
|
|
|
naughty.action = require("naughty.action")
|
2017-08-13 08:49:11 +02:00
|
|
|
naughty.list = require("naughty.list")
|
2017-07-02 04:43:26 +02:00
|
|
|
naughty.layout = require("naughty.layout")
|
2017-08-13 08:49:11 +02:00
|
|
|
naughty.widget = require("naughty.widget")
|
2019-03-12 19:23:09 +01:00
|
|
|
naughty.container = require("naughty.container")
|
|
|
|
naughty.action = require("naughty.action")
|
2017-07-02 04:43:26 +02:00
|
|
|
naughty.notification = require("naughty.notification")
|
|
|
|
|
2019-04-28 22:08:31 +02:00
|
|
|
-- Handle runtime errors during startup
|
|
|
|
if capi.awesome.startup_errors then
|
2019-08-03 07:43:48 +02:00
|
|
|
-- Wait until `rc.lua` is executed before creating the notifications.
|
|
|
|
-- Otherwise nothing is handling them (yet).
|
|
|
|
awesome.connect_signal("startup", function()
|
|
|
|
naughty.emit_signal(
|
|
|
|
"request::display_error", capi.awesome.startup_errors, true
|
|
|
|
)
|
|
|
|
end)
|
2019-04-28 22:08:31 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
-- Handle runtime errors after startup
|
|
|
|
do
|
|
|
|
local in_error = false
|
|
|
|
capi.awesome.connect_signal("debug::error", function (err)
|
|
|
|
-- Make sure we don't go into an endless error loop
|
|
|
|
if in_error then return end
|
|
|
|
in_error = true
|
|
|
|
|
|
|
|
naughty.emit_signal("request::display_error", tostring(err), false)
|
|
|
|
|
|
|
|
in_error = false
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
2015-01-10 18:44:30 +01:00
|
|
|
return naughty
|
|
|
|
|
|
|
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|