null config

This commit is contained in:
Yessiest 2022-07-04 18:00:56 +04:00
commit 06e87cca1f
1 changed files with 61 additions and 0 deletions

61
rc.lua Normal file
View File

@ -0,0 +1,61 @@
--libraries
local awful = require("awful")
local beautiful = require("beautiful")
local gears = require("gears")
--error handling
if awesome.startup_errors then
print("Error during startup: "..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
print("Error during runtime: "..tostring(err))
in_error = false
end)
end
--theme
beautiful.init(gears.filesystem.get_themes_dir().."default/theme.lua")
--screen setup
awful.screen.connect_for_each_screen(function(s)
awful.tag({ "1" }, s, awful.layout.suit.floating)
end)
--client mouse bindings
clientbuttons = gears.table.join(
awful.button({}, 1, function(c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
end)
)
--client rules
awful.rules.rules = {
{ --catch-all rules
rule = {},
properties = {
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
}
}
}
--client signals
client.connect_signal("manage", function(c)
-- append the window at the end rather than at the top.
-- if not awesome.startup then awful.client.setslave(c) end
if awesome.startup
--place client on available screens when screen count changes
and not c.size_hints.user_position
and not c.size_hints.program_position then
awful.placement.no_offscreen(c)
end
end)