-
Notifications
You must be signed in to change notification settings - Fork 0
/
rc.lua
79 lines (70 loc) · 1.95 KB
/
rc.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
-- awesome_mode: api-level=4:screen=on
pcall(require, "luarocks.loader")
local awful = require("awful")
require("awful.autofocus")
local menubar = require("menubar")
local naughty = require("naughty")
local vars = require("config.variables")
local terminal = vars.apps.terminal
awful.util.terminal = terminal
menubar.utils.terminal = terminal
awful.util.shell = vars.apps.shell
-- Error handling {{{
-- Handle runtime errors during startup.{{{
if awesome.startup_errors then
naughty.notification({
preset = naughty.config.presets.critical,
title = "Startup encountered a problem",
message = awesome.startup_errors,
})
end --}}}
-- Display Error {{{
naughty.connect_signal("request::display_error", function(message, startup)
naughty.notification({
urgency = "critical",
title = "Oops, an error happened" .. (startup and " during startup!" or "!"),
message = message,
})
end) --}}}
-- Deprecation Notices {{{
local dump_str = require("lib.debug").dump_str
awesome.connect_signal("debug::deprecation", function(hint, see, args)
naughty.notification({
urgency = "low",
title = "Deprecated",
message = string.format("%s\n%s\n%s", hint, see, dump_str(args)),
timeout = 10,
})
end) --}}}
-- Handle runtime errors after startup {{{
do
local in_error = false
awesome.connect_signal("debug::error", function(err)
if in_error then
return
end
in_error = true
naughty.notification({
preset = naughty.config.presets.critical,
title = "Error",
message = tostring(err),
})
in_error = false
end)
end --}}}
-- }}}
require("theme.theme")
require("config.wallpaper")
require("config.menu")
require("config.layouts")
require("config.wibar")
require("config.keybindings")
require("config.rules")
require("config.signals")
require("widgets.osd")
require("config.autoload")
require("config.naughty")
collectgarbage()
collectgarbage("setpause", 110)
collectgarbage("setstepmul", 1000)
-- vim: fdm=marker fdl=1