50 lines
1.4 KiB
Lua
50 lines
1.4 KiB
Lua
local naughty = require('naughty')
|
|
local beautiful = require('beautiful')
|
|
|
|
if awesome.startup_errors then
|
|
naughty.notify({
|
|
preset = naughty.config.presets.critical,
|
|
title = 'Oops, there were errors during startup!',
|
|
text = awesome.startup_errors,
|
|
})
|
|
end
|
|
|
|
do
|
|
local in_error = false
|
|
|
|
awesome.connect_signal('debug::error', function(err)
|
|
if in_error then return end
|
|
in_error = true
|
|
naughty.notify({
|
|
preset = naughty.config.presets.critical,
|
|
title = 'Oops, an error happened!',
|
|
text = tostring(err),
|
|
})
|
|
in_error = false
|
|
end)
|
|
end
|
|
|
|
local conf_dir = require('src.util.path').conf_dir
|
|
package.path = (conf_dir .. '/lib/?/init.lua;') .. (conf_dir .. '/lib/?.lua;') .. package.path
|
|
package.cpath = (conf_dir .. '/build/?.so;') .. package.cpath
|
|
|
|
require('awful.autofocus')
|
|
require('src.layouts')
|
|
require('src.client')
|
|
beautiful.init(require('src.theme'))
|
|
root.keys(require('src.global_keys'))
|
|
|
|
screen.connect_signal('arrange', function(s)
|
|
local only_one = #s.tiled_clients == 1
|
|
for _, c in pairs(s.clients) do
|
|
if c.no_border or (only_one and not c.floating or c.maximized or c.fullscreen) then
|
|
c.border_width = 0
|
|
else
|
|
c.border_width = beautiful.border_width
|
|
end
|
|
end
|
|
end)
|
|
|
|
local on_screen_connect = require('src.theme.wibar')
|
|
require('awful').screen.connect_for_each_screen(function(s) on_screen_connect(s) end)
|