]> git.rmz.io Git - dotfiles.git/blob - awesome/rc.lua
Other changes at cadscan (with the ones I want to keep stripped)
[dotfiles.git] / awesome / rc.lua
1 -- Awesome libraries {{{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")
9 lain = require("lain")
10 require("awful.remote")
11
12 -- Error handling {{{1
13 -- Check if awesome encountered an error during startup and fell back to
14 -- another config (This code will only ever execute for the fallback config)
15 if awesome.startup_errors then
16 naughty.notify({ preset = naughty.config.presets.critical,
17 title = "Oops, there were errors during startup!",
18 text = awesome.startup_errors })
19 end
20
21 -- Handle runtime errors after startup
22 do
23 local in_error = false
24 awesome.connect_signal("debug::error", function (err)
25 -- Make sure we don't go into an endless error loop
26 if in_error then return end
27 in_error = true
28
29 naughty.notify({ preset = naughty.config.presets.critical,
30 title = "Oops, an error happened!",
31 text = err })
32 in_error = false
33 end)
34 end
35
36 -- Variable definitions {{{1
37 -- Themes define colours, icons, and wallpapers
38 beautiful.init(awful.util.getdir("config").."/themes/mlp/theme.lua")
39
40 -- This is used later as the default terminal and editor to run.
41 terminal = "urxvtc"
42 editor = os.getenv("EDITOR") or "vim"
43 editor_cmd = terminal .. " -e " .. editor
44
45 -- Wallpaper {{{1
46 if beautiful.wallpaper then
47 for s = 1, screen.count() do
48 gears.wallpaper.maximized(beautiful.wallpaper, s, true)
49 end
50 end
51
52 -- Require files {{{1
53 require("bindings")
54 require("tags")
55 require("menu")
56 require("topbar")
57 require("rules")
58 -- require("conky")
59 require("autostart")
60 require("signals")
61
62 -- Set keys
63 root.keys(globalkeys)