1 -- Standard awesome library {{{1
2 gears = require("gears")
3 awful = require("awful")
4 awful.rules = require("awful.rules")
5 require("awful.autofocus")
6 beautiful = require("beautiful")
7 naughty = require("naughty")
8 menubar = require("menubar")
11 -- Error handling {{{1
12 -- Check if awesome encountered an error during startup and fell back to
13 -- another config (This code will only ever execute for the fallback config)
14 if awesome.startup_errors then
15 naughty.notify({ preset = naughty.config.presets.critical,
16 title = "Oops, there were errors during startup!",
17 text = awesome.startup_errors })
20 -- Handle runtime errors after startup
22 local in_error = false
23 awesome.connect_signal("debug::error", function (err)
24 -- Make sure we don't go into an endless error loop
25 if in_error then return end
28 naughty.notify({ preset = naughty.config.presets.critical,
29 title = "Oops, an error happened!",
35 -- Variable definitions {{{1
36 -- Themes define colours, icons, and wallpapers
37 beautiful.init(awful.util.getdir("config").."/themes/mlp/theme.lua")
39 -- This is used later as the default terminal and editor to run.
41 editor = os.getenv("EDITOR") or "vim"
42 editor_cmd = terminal .. " -e " .. editor
45 if beautiful.wallpaper then
46 for s = 1, screen.count() do
47 gears.wallpaper.maximized(beautiful.wallpaper, s, true)