-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.lua
53 lines (41 loc) · 1.67 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
-------------------------------------------------------------
-- Carrot main application
-------------------------------------------------------------
-- Licensed under the GNU General Public License v3:
-- https://opensource.org/licenses/GPL-3.0
-------------------------------------------------------------
-- Copyright (c) 2018 Pouyan Heyratpour <[email protected]>
-------------------------------------------------------------
local awful = require("awful")
local menubar = require("menubar")
local Root = require("carrot.root") -- Root keys and rules
local Menus = require("carrot.menus")
local Errors = require("carrot.errors") -- Error handling
local Themes = require("carrot.themes") -- Themes manager
local Clients = require("carrot.clients") -- Clients (Windows) keys and rules
local Configs = require("carrot.configs") -- Configuration parser
local Screens = require("carrot.screens") -- Screen wibox
local function loadConfiguration()
-- TODO: Load configurations from different locations
local conf = Configs.LoadFile(os.getenv("HOME") .. "/.config/awesome/config")
return conf
end
local function registerErrorHandlers()
Errors.Handle()
end
local function start()
registerErrorHandlers()
local conf = loadConfiguration()
local menu = Menus.New(conf.apps)
Root.Setup(conf, menu)
Themes.Apply(conf.theme)
Clients.Setup(conf)
Screens.Setup(conf, menu)
-- TODO: Read autosrun apps from config and standard files and load them on
-- desired screens (tag them)
-- awful.util.spawn_with_shell("~/.config/awesome/autorun.sh")
end
return {
Start = start;
}
-- vim: foldmethod=marker:filetype=lua:expandtab:shiftwidth=2:tabstop=2:softtabstop=2:textwidth=80