2023-04-20 04:08:44 +00:00
|
|
|
-- If LuaRocks is installed, make sure that packages installed through it are
|
|
|
|
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
|
|
|
|
pcall(require, "luarocks.loader")
|
|
|
|
|
|
|
|
-- Standard awesome library
|
|
|
|
local gears = require("gears")
|
|
|
|
local awful = require("awful")
|
|
|
|
|
|
|
|
-- Theme handling library
|
|
|
|
local beautiful = require("beautiful")
|
|
|
|
|
2023-05-23 05:12:23 +00:00
|
|
|
-- Miscellaneous awesome library
|
2023-04-20 04:08:44 +00:00
|
|
|
local menubar = require("menubar")
|
|
|
|
|
|
|
|
RC = {} -- global namespace, on top before require any modules
|
|
|
|
RC.vars = require("main.user-variables")
|
|
|
|
|
|
|
|
-- {{{ Error handling -- }}}
|
|
|
|
require("main.error-handling")
|
|
|
|
|
|
|
|
-- {{{ Variable definitions
|
|
|
|
-- Themes define colours, icons, font and wallpapers.
|
|
|
|
beautiful.init("~/.config/awesome/themes/spacestation/theme.lua")
|
|
|
|
beautiful.wallpaper = RC.vars.wallpaper
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
modkey = RC.vars.modkey
|
|
|
|
|
|
|
|
-- Custom Local Library
|
|
|
|
local main = {
|
|
|
|
layouts = require("main.layouts"),
|
|
|
|
tags = require("main.tags"),
|
|
|
|
menu = require("main.menu"),
|
|
|
|
rules = require("main.rules"),
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Custom Local Library: Keys and Mouse Binding
|
2023-05-23 05:12:23 +00:00
|
|
|
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")
|
2023-04-20 04:08:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
-- {{{ Layouts
|
|
|
|
-- Table of layouts to cover with awful.layout.inc, order matters.
|
|
|
|
-- a variable needed in main.tags, and statusbar
|
|
|
|
-- awful.layout.layouts = { ... }
|
|
|
|
RC.layouts = main.layouts()
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- {{{ Tags
|
|
|
|
-- Define a tag table which hold all screen tags.
|
|
|
|
-- a variable needed in rules, tasklist, and globalkeys
|
|
|
|
RC.tags = main.tags()
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- {{{ Menu
|
|
|
|
-- Create a laucher widget and a main 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 configuration
|
|
|
|
-- Set the terminal for applications that require it
|
|
|
|
menubar.utils.terminal = RC.vars.terminal
|
|
|
|
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- {{{ Mouse and Key bindings
|
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
|
|
|
|
|
|
|
-- 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
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- Keyboard map indicator and switcher
|
|
|
|
mykeyboardlayout = awful.widget.keyboardlayout()
|
|
|
|
|
|
|
|
-- {{{ Statusbar: Wibar
|
|
|
|
require("deco.statusbar")
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- {{{ Rules
|
|
|
|
-- Rules to apply to new clients (through the "manage" signal).
|
|
|
|
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
|
|
|
)
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- {{{ Signals
|
|
|
|
require("main.signals")
|
|
|
|
-- }}}
|
|
|
|
|
|
|
|
-- {{{ Startup applications
|
|
|
|
require("main.startup")
|
|
|
|
-- }}}
|