]> git.rmz.io Git - dotfiles.git/blob - awesome/rc.lua
22ff0a4504de1ed4bdc8296ba556c816a27c82e5
[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 require("awful.remote")
10
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 })
18 end
19
20 -- Handle runtime errors after startup
21 do
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
26 in_error = true
27
28 naughty.notify({ preset = naughty.config.presets.critical,
29 title = "Oops, an error happened!",
30 text = tostring(err) })
31 in_error = false
32 end)
33 end
34
35 -- Variable definitions {{{1
36 -- Themes define colours, icons, font and wallpapers.
37 beautiful.init(gears.filesystem.get_dir("config").."/themes/mlp/theme.lua")
38
39 -- This is used later as the default terminal to run.
40 terminal = os.getenv("TERMINAL") or "xterm"
41 terminal_class = (function()
42 local map = { urxvt = "URxvt"
43 , urxvtc = "URxvt"
44 , xterm = "XTerm"
45 }
46 return map[terminal] or terminal
47 end)()
48
49 -- Require files {{{1
50 require("bindings")
51 require("tags")
52 require("menu")
53 require("topbar")
54 require("rules")
55 -- require("conky")
56 require("signals")
57
58 -- Set keys
59 root.keys(globalkeys)