mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-22 09:53:28 +02:00
With a custom compilation. It supports more stuff than xfce4-terminal, notably italics. There are still a lot to do to have something as nice as rxvt... Should be compiled with GTK3, otherwise, it will have the same problems than xfce4-terminal.
76 lines
2.1 KiB
Lua
76 lines
2.1 KiB
Lua
require("awful")
|
|
require("awful.autofocus")
|
|
require("awful.rules")
|
|
require("beautiful")
|
|
require("naughty")
|
|
|
|
-- Simple function to load additional LUA files from rc/.
|
|
function loadrc(name, mod)
|
|
local success
|
|
local result
|
|
|
|
-- Which file? In rc/ or in lib/?
|
|
local path = awful.util.getdir("config") .. "/" ..
|
|
(mod and "lib" or "rc") ..
|
|
"/" .. name .. ".lua"
|
|
|
|
-- If the module is already loaded, don't load it again
|
|
if mod and package.loaded[mod] then return package.loaded[mod] end
|
|
|
|
-- Execute the RC/module file
|
|
success, result = pcall(function() return dofile(path) end)
|
|
if not success then
|
|
naughty.notify({ title = "Error while loading an RC file",
|
|
text = "When loading `" .. name ..
|
|
"`, got the following error:\n" .. result,
|
|
preset = naughty.config.presets.critical
|
|
})
|
|
return print("E: error loading RC file '" .. name .. "': " .. result)
|
|
end
|
|
|
|
-- Is it a module?
|
|
if mod then
|
|
return package.loaded[mod]
|
|
end
|
|
|
|
return result
|
|
end
|
|
|
|
loadrc("errors") -- errors and debug stuff
|
|
|
|
-- Create cache directory
|
|
os.execute("test -d " .. awful.util.getdir("cache") ..
|
|
" || mkdir -p " .. awful.util.getdir("cache"))
|
|
|
|
-- Global configuration
|
|
modkey = "Mod4"
|
|
config = {}
|
|
config.terminal = "evilvte"
|
|
config.termclass = "Evilvte"
|
|
config.layouts = {
|
|
awful.layout.suit.tile,
|
|
awful.layout.suit.tile.left,
|
|
awful.layout.suit.tile.bottom,
|
|
awful.layout.suit.fair,
|
|
awful.layout.suit.floating,
|
|
}
|
|
config.hostname = awful.util.pread('uname -n'):gsub('\n', '')
|
|
config.browser = "chromium"
|
|
|
|
-- Remaining modules
|
|
loadrc("xrun") -- xrun function
|
|
loadrc("appearance") -- theme and appearance settings
|
|
loadrc("debug") -- debugging primitive `dbg()`
|
|
|
|
loadrc("start") -- programs to run on start
|
|
loadrc("bindings") -- keybindings
|
|
loadrc("wallpaper") -- wallpaper settings
|
|
loadrc("widgets") -- widgets configuration
|
|
loadrc("tags") -- tags handling
|
|
loadrc("xlock") -- lock screen
|
|
loadrc("signals") -- window manager behaviour
|
|
loadrc("rules") -- window rules
|
|
loadrc("quake") -- quake console
|
|
loadrc("xrandr") -- xrandr menu
|
|
|
|
root.keys(config.keys.global)
|