-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrc.lua
More file actions
27 lines (21 loc) · 728 Bytes
/
Copy pathrc.lua
File metadata and controls
27 lines (21 loc) · 728 Bytes
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
--stolen from http://www.markurashi.de/dotfiles/awesome/rc.lua
-- failsafe mode
-- if the current config fail, load the default rc.lua
-- You can debug it using:
-- Xephyr -ac -nolisten tcp -br -noreset -screen 800x600 :1
-- DISPLAY=:1.0 awesome
awful = require("awful")
naughty = require("naughty")
confdir = awful.util.getdir("config")
local rc, err = loadfile(confdir .. "/main.lua");
if rc then
rc, err = pcall(rc);
if rc then
return;
end
end
dofile("/etc/xdg/awesome/rc.lua");
for s = 1,screen.count() do
mypromptbox[s].text = awful.util.escape(err:match("[^\n]*"));
end
naughty.notify{text="Awesome crashed during startup on " .. os.date("%d/%m/%Y %T:\n\n") .. err .. "\n", timeout = 0}