-- If LuaRocks is installed, make sure that packages installed through it are
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
package.path = os.getenv("HOME").."/.config/awesome/libs/?.lua;"
               ..os.getenv("HOME").."/.config/awesome/libs/?/init.lua;"
               ..os.getenv("HOME").."/.config/awesome/modules/?/init.lua;"
               ..os.getenv("HOME").."/.config/awesome/modules/?.lua;"
               ..package.path
package.cpath = os.getenv("HOME").."/.config/awesome/libs/?.so;"..package.cpath

pcall(require, "luarocks.loader")

-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
-- Enable hotkeys help widget for VIM and other apps
-- when client with a matching name is opened:
require("awful.hotkeys_popup.keys")

-- {{{ Default modules
-- WARNING: Order matters. Don't change it unless you know what you're doing. Read ./core/README.txt
require("core.error")
require("core.vars")
require("core.style")
require("themes.icons")
require("core.binds")
require("core.layout")
require("core.rules")
require("core.signals")
-- }}}

-- This is a questionable decision, considering that lua has automatic garbage collection, however, it might potentially improve memory usage while not using up much cpu or memory either.
require("gears").timer.start_new(60,function()
    collectgarbage("collect")
end)

require("custom_binds")
require("awesomerc")
--require("powerman")
