awesomewm/rc.lua

71 lines
1.6 KiB
Lua
Executable File

-- Load libaries.
-- We only need to load these once.
-- These are global variables, all scripts can access them
gears = require("gears")
awful = require("awful")
naughty = require("naughty")
beautiful = require("beautiful")
menubar = require("menubar")
wibox = require("wibox")
configuration_dir = gears.filesystem.get_configuration_dir()
require("awful.autofocus")
-- Quick debug function
debug_message = function(msg)
naughty.notify({title = "Debug message:", text = tostring(msg)})
end
-- These must be loaded in order.
-- Make sure you've created conf.lua!
conf = require("conf")
conf.sound_dir = configuration_dir .. "theme/resources/sounds/"
conf.icon_dir = configuration_dir .. "theme/resources/icons/"
layoutmanager = require("desktop.layoutmanager")
layoutmanager.layouts = conf.layouts
bin = require("bin")
wrapper = require("wrapper")
wrapper.ibus.set(1)
beautiful.init(require("theme"))
desktop = require("desktop")
-- Autostart
for i, v in ipairs(conf.startup_commands) do
awful.spawn(v)
end
-- Enable hotkeys help widget for VIM and other apps
-- when client with a matching name is opened:
--require("awful.hotkeys_popup.keys")
-- Check for errors
dofile(configuration_dir .. "errors.lua")
terminal = conf.terminal
menubar.utils.terminal = terminal
------------------
-- Load Modules --
------------------
-- Load key bindings
local binds = require("binds")
root.keys(binds.keys)
root.buttons(binds.buttons)
-- Load client methods
awful.rules.rules = require("clients.rules")
dofile(configuration_dir .. "clients/signals.lua")
require("clients.render")