------ includes --- enable luarocks if installed pcall(require, "luarocks.loader") --- awesome stdlib local gears = require("gears") local awful = require("awful") --- theme lib local beautiful = require("beautiful") --- other awesome libs local menubar = require("menubar") RC = {} -- global namespace, on top before require any modules RC.vars = require("main.user_vars") ------------------------------------------ ------ error handling require("main.errors") ------ theme stuff local themename = "spacestation" local style = { vars = require("themes." .. themename .. ".vars") } beautiful.init("~/.config/awesome/themes/" .. themename .. "/theme.lua") beautiful.wallpaper = style.vars.wallpaper ------- custom Local Library --- main local main = { layouts = require("main.layouts"), tags = require("main.tags" ), menu = require("main.menu" ), rules = require("main.rules" ) } --- keybindings and mouse buttons local bindings = { global_keys = require("bindings.keys.global" ), tags = require("bindings.keys.tags" ), client_keys = require("bindings.keys.client" ), global_buttons = require("bindings.mouse.global"), client_buttons = require("bindings.mouse.client") } modkey = RC.vars.modkey ------ layouts RC.layouts = main.layouts() ------ tags RC.tags = main.tags() ------ menu RC.mainmenu = awful.menu({ items = main.menu() }) -- in globalkeys --- a variable needed in statusbar (helper) RC.launcher = awful.widget.launcher( { image = beautiful.awesome_icon, menu = RC.mainmenu } ) ------ menubar config menubar.utils.terminal = RC.vars.terminal ------ enable keybindings and mouse buttons RC.global_keys = bindings.global_keys() RC.global_keys = bindings.tags(RC.global_keys) ------ set root root.buttons(bindings.global_buttons()) root.keys(RC.global_keys) ------ keyboard layout indicator --- * since i use ibus, i don't know if this does anything? mykeyboardlayout = awful.widget.keyboardlayout() ------ statusbar require("themes."..themename..".statusbar") ------ rules --- rules to apply to new clients awful.rules.rules = main.rules( bindings.client_keys(), bindings.client_buttons() ) ------ signals require("main.signals") ------ startup require("main.startup")