1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2025-01-11 02:08:08 +00:00

Moved Error handling away from rc.lua.theme files

This commit is contained in:
Alexandre Viau 2014-05-10 20:15:20 -04:00
parent 79f7396b73
commit b88e5fe10b
9 changed files with 38 additions and 160 deletions

22
myrc/errors.lua Normal file
View file

@ -0,0 +1,22 @@
local naughty = require("naughty")
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- }}}

View file

@ -17,26 +17,8 @@ local drop = require("scratchdrop")
local lain = require("lain")
-- }}}
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- }}}
-- Error handling
require("myrc.errors")
-- STARTUP apps
require("settings.startup")

View file

@ -18,26 +18,8 @@ local lain = require("lain")
local eminent = require("eminent")
-- }}}
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- }}}
-- Error handling
require("myrc.errors")
-- STARTUP apps
require("settings.startup")

View file

@ -17,26 +17,8 @@ local drop = require("scratchdrop")
local lain = require("lain")
-- }}}
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- }}}
-- Error handling
require("myrc.errors")
-- STARTUP apps
require("settings.startup")

View file

@ -17,26 +17,8 @@ local drop = require("scratchdrop")
local lain = require("lain")
-- }}}
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- }}}
-- Error handling
require("myrc.errors")
-- STARTUP apps
require("settings.startup")

View file

@ -17,26 +17,8 @@ local drop = require("scratchdrop")
local lain = require("lain")
-- }}}
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- }}}
-- Error handling
require("myrc.errors")
-- STARTUP apps
require("settings.startup")

View file

@ -17,26 +17,8 @@ local drop = require("scratchdrop")
local lain = require("lain")
-- }}}
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- }}}
-- Error handling
require("myrc.errors")
-- STARTUP apps
require("settings.startup")

View file

@ -17,26 +17,8 @@ local drop = require("scratchdrop")
local lain = require("lain")
-- }}}
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- }}}
-- Error handling
require("myrc.errors")
-- STARTUP apps
require("settings.startup")

View file

@ -17,26 +17,8 @@ local drop = require("scratchdrop")
local lain = require("lain")
-- }}}
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- }}}
-- Error handling
require("myrc.errors")
-- STARTUP apps
require("settings.startup")