[ create a new paste ] login | about

Link: http://codepad.org/qLw7niAm    [ raw code | fork ]

Plain Text, pasted on Nov 5:
-- Failsafe mode
-- If the current config *fail*, Load the *default* rc.lua

require("awful")
require("naughty")

-- Check if the current config *fail*
confdir = awful.util.getdir("config")
local rc, err = loadfile(confdir .. "/awesome.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

-- Send a notify
naughty.notify{text="Awesome crashed during startup on " ..
    os.date("%d%/%m/%Y %T:\n\n")
    .. err .. "\n", timeout = 0}


Create a new paste based on this one


Comments: