init.lua 868 B

1234567891011121314151617181920212223242526
  1. -- {{{ Error handling
  2. -- Check if awesome encountered an error during startup and fell back to
  3. -- another config (This code will only ever execute for the fallback config)
  4. if awesome.startup_errors then
  5. naughty.notify({ preset = naughty.config.presets.critical,
  6. title = "Oops, there were errors during startup!",
  7. text = awesome.startup_errors })
  8. end
  9. -- Handle runtime errors after startup
  10. do
  11. local in_error = false
  12. awesome.connect_signal("debug::error", function (err)
  13. -- Make sure we don't go into an endless error loop
  14. if in_error then return end
  15. in_error = true
  16. naughty.notify({ preset = naughty.config.presets.critical,
  17. title = "Oops, an error happened!",
  18. text = tostring(err) })
  19. in_error = false
  20. end)
  21. end
  22. -- }}}