92 lines
2.1 KiB
Lua
Executable File
92 lines
2.1 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()
|
|
bin_dir = configuration_dir .. "bin/"
|
|
script_dir = bin_dir .. "scripts/"
|
|
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/"
|
|
|
|
bin = require("bin")
|
|
wrapper = require("wrapper")
|
|
wrapper.ibus.set(1)
|
|
|
|
beautiful.init(require("theme"))
|
|
|
|
-- Initialize volume controller
|
|
classes = require("classes")
|
|
vol = classes.Volume{pa_sink = conf.pamixer_sink}
|
|
bck = classes.Backlight{}
|
|
batt = classes.Battery{}
|
|
mpc = classes.MPC{mpd_host = conf.mpd_host}
|
|
|
|
desktop = require("desktop")
|
|
|
|
|
|
|
|
--------------
|
|
-- Autostart--
|
|
--------------
|
|
bin.backlight.redshift_reset()
|
|
|
|
-- Start compositor (compton tryone fork)
|
|
awful.spawn("killall picom", false)
|
|
-- awful.spawn("picom --daemon --config " .. configuration_dir .. "/bin/configs/compton.conf", false)
|
|
|
|
-- Start ibus (advanced multilanguage input manager)
|
|
awful.spawn("ibus-daemon --daemonize --replace --xim", false)
|
|
|
|
-- Run dock script
|
|
awful.spawn("bash /etc/dock.sh start", false)
|
|
|
|
-- 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")
|