awesomewm/rc.lua

95 lines
2.2 KiB
Lua
Raw Normal View History

2021-08-01 07:24:26 -07:00
-- 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")
2022-04-23 21:13:35 -07:00
2021-08-01 07:24:26 -07:00
configuration_dir = gears.filesystem.get_configuration_dir()
2022-04-24 09:10:12 -07:00
bin_dir = configuration_dir .. "bin/"
script_dir = bin_dir .. "scripts/"
2021-08-01 07:24:26 -07:00
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/"
2021-08-01 08:13:53 -07:00
layoutmanager = require("desktop.layoutmanager")
2021-08-01 07:24:26 -07:00
layoutmanager.layouts = conf.layouts
bin = require("bin")
wrapper = require("wrapper")
wrapper.ibus.set(1)
beautiful.init(require("theme"))
2022-04-23 21:13:35 -07:00
-- Initialize volume controller
2022-04-24 08:32:58 -07:00
Volume = require("volume")
vol = Volume{pa_sink = conf.pamixer_sink}
2022-04-23 21:13:35 -07:00
2022-04-24 09:10:12 -07:00
Backlight = require("backlight")
bck = Backlight{}
2021-08-01 07:24:26 -07:00
desktop = require("desktop")
2022-04-23 21:13:35 -07:00
2021-08-01 07:24:26 -07:00
--------------
-- Autostart--
--------------
bin.backlight.redshift_reset()
-- Start compositor (compton tryone fork)
2022-04-23 21:20:08 -07:00
awful.spawn("killall picom", false)
-- awful.spawn("picom --daemon --config " .. configuration_dir .. "/bin/configs/compton.conf", false)
2021-08-01 07:24:26 -07:00
-- Start ibus (advanced multilanguage input manager)
awful.spawn("ibus-daemon --daemonize --replace --xim", false)
2022-04-23 21:20:08 -07:00
-- Run dock script
awful.spawn("bash /etc/dock.sh start", false)
2021-08-01 07:24:26 -07:00
-- Redshift
bin.backlight.redshift(5600)
-- 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")