dotfiles/awesome/rc.lua

87 lines
2.2 KiB
Lua
Raw Permalink Normal View History

2023-05-23 05:35:51 +00:00
------ includes
--- enable luarocks if installed
2023-04-20 04:08:44 +00:00
pcall(require, "luarocks.loader")
2023-05-23 05:35:51 +00:00
--- awesome stdlib
2023-04-20 04:08:44 +00:00
local gears = require("gears")
local awful = require("awful")
2023-05-23 05:35:51 +00:00
--- theme lib
2023-04-20 04:08:44 +00:00
local beautiful = require("beautiful")
2023-05-23 05:35:51 +00:00
--- other awesome libs
2023-04-20 04:08:44 +00:00
local menubar = require("menubar")
RC = {} -- global namespace, on top before require any modules
2023-05-23 05:35:51 +00:00
RC.vars = require("main.user_vars")
------------------------------------------
------ error handling
require("main.errors")
2023-04-20 04:08:44 +00:00
2023-05-23 05:35:51 +00:00
------ 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
2023-04-20 04:08:44 +00:00
2023-05-23 05:35:51 +00:00
------- custom Local Library
--- main
2023-04-20 04:08:44 +00:00
local main = {
layouts = require("main.layouts"),
2023-05-23 05:35:51 +00:00
tags = require("main.tags" ),
menu = require("main.menu" ),
rules = require("main.rules" )
2023-04-20 04:08:44 +00:00
}
2023-05-23 05:35:51 +00:00
--- keybindings and mouse buttons
2023-05-23 05:12:23 +00:00
local bindings = {
2023-05-23 05:35:51 +00:00
global_keys = require("bindings.keys.global" ),
tags = require("bindings.keys.tags" ),
client_keys = require("bindings.keys.client" ),
2023-05-23 05:12:23 +00:00
global_buttons = require("bindings.mouse.global"),
client_buttons = require("bindings.mouse.client")
2023-04-20 04:08:44 +00:00
}
2023-05-23 05:35:51 +00:00
modkey = RC.vars.modkey
2023-04-20 04:08:44 +00:00
2023-05-23 05:35:51 +00:00
------ layouts
RC.layouts = main.layouts()
------ tags
2023-04-20 04:08:44 +00:00
RC.tags = main.tags()
2023-05-23 05:35:51 +00:00
------ menu
2023-04-20 04:08:44 +00:00
RC.mainmenu = awful.menu({ items = main.menu() }) -- in globalkeys
2023-05-26 02:15:43 +00:00
--- a variable needed in statusbar (helper)
2023-04-20 04:08:44 +00:00
RC.launcher = awful.widget.launcher(
{ image = beautiful.awesome_icon, menu = RC.mainmenu }
)
2023-05-23 05:35:51 +00:00
------ menubar config
2023-04-20 04:08:44 +00:00
menubar.utils.terminal = RC.vars.terminal
2023-05-23 05:35:51 +00:00
------ enable keybindings and mouse buttons
2023-05-23 05:12:23 +00:00
RC.global_keys = bindings.global_keys()
RC.global_keys = bindings.tags(RC.global_keys)
2023-04-20 04:08:44 +00:00
2023-05-23 05:35:51 +00:00
------ set root
2023-05-23 05:12:23 +00:00
root.buttons(bindings.global_buttons())
root.keys(RC.global_keys)
2023-04-20 04:08:44 +00:00
2023-05-23 05:35:51 +00:00
------ keyboard layout indicator
--- * since i use ibus, i don't know if this does anything?
2023-04-20 04:08:44 +00:00
mykeyboardlayout = awful.widget.keyboardlayout()
2023-05-23 05:35:51 +00:00
------ statusbar
require("themes."..themename..".statusbar")
2023-04-20 04:08:44 +00:00
2023-05-23 05:35:51 +00:00
------ rules
--- rules to apply to new clients
2023-04-20 04:08:44 +00:00
awful.rules.rules = main.rules(
2023-05-23 05:12:23 +00:00
bindings.client_keys(),
bindings.client_buttons()
2023-04-20 04:08:44 +00:00
)
2023-05-23 05:35:51 +00:00
------ signals
2023-04-20 04:08:44 +00:00
require("main.signals")
2023-05-23 05:35:51 +00:00
------ startup
require("main.startup")