]> git.rmz.io Git - dotfiles.git/blob - awesome/rc.lua
awesome: move set_wallpaper to tags.lua and call it on screen connect
[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 = tostring(err) })
32 in_error = false
33 end)
34 end
35
36 -- Variable definitions {{{1
37 -- Themes define colours, icons, font 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 -- Require files {{{1
46 require("bindings")
47 require("tags")
48 require("menu")
49 require("topbar")
50 require("rules")
51 -- require("conky")
52 require("signals")
53
54 -- Set keys
55 root.keys(globalkeys)